Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kotlin sintax overview
Search
Felipe Oliveira
April 30, 2016
Programming
0
79
Kotlin sintax overview
This talk is result of my presentation on AndroidStudyJams Maceió
Felipe Oliveira
April 30, 2016
Tweet
Share
More Decks by Felipe Oliveira
See All by Felipe Oliveira
Validação com Android Saripaar 2
oliveiradev
0
84
Other Decks in Programming
See All in Programming
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
660
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
210
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.1k
AtCoder Conference 2025
shindannin
0
770
AIエージェントの設計で注意するべきポイント6選
har1101
5
2.6k
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
150
マスタデータ問題、マイクロサービスでどう解くか
kts
0
150
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
140
はじめてのカスタムエージェント【GitHub Copilot Agent Mode編】
satoshi256kbyte
0
100
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
270
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
240
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
140
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
Done Done
chrislema
186
16k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
110
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Making Projects Easy
brettharned
120
6.5k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
520
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
320
Context Engineering - Making Every Token Count
addyosmani
9
560
Designing for Performance
lara
610
70k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
170
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
71
Building AI with AI
inesmontani
PRO
1
580
Transcript
Kotlin for Android Felipe Oliveira oliveiradev
Felipe Oliveira
Linguagem foi criada pela JetBrains, Kotlin roda na JVM e
é 100% interoperável com Java.
None
Sintaxe overview: atributos
Sintaxe overview: métodos
Sintaxe overview: classes class Person {} open class Person {}
data class Person(val name: String, val age: Int)
Sintaxe overview: Null safety val person: Person? = Person("Felipe",24) fun
main(args: Array<String>) { print(person?.name) }
Sintaxe overview: Default arguments fun query(table: String, columns: Array<String>, orderBy:
String? = null, limit: Int? = null){ ... } query("PEOPLE", arrayOf("ID","NAME")) query("PEOPLE", arrayOf("ID","NAME") , limit = 10)
Sintaxe overview: Extension functions fun ImageView.loadForUrl(url: String){ Picasso.with(context).load(url).into(this) } //single
expression sintax fun String.hello() = "Hello $this"
Sintaxe overview: When expression when(value){ is String -> print("eh String")
else -> print("n eh String") }
Sintaxe overview: Smart cast if (value is String){ print(value.length) }
Instalando plugin no Android Studio apply plugin: 'kotlin-android' android {
... sourceSets { main.java.srcDirs += 'src/main/kotlin' } ... } dependencies { ... compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" ... } buildscript { ext.kotlin_version = '1.0.1-2' repositories { mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } }
Referências Jake Wharton https://plus.google.com/+JakeWharton/posts/WSCoqkJ5MBj Kotlin lang docs reference https://kotlinlang.org/docs/reference Antonio
Leiva Blog http://antonioleiva.com/kotlin/ Comece agora a brincar com kotlin http://try.kotlinlang.org/