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, The Force Awakens
Search
Yury Camacho
June 03, 2017
Technology
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kotlin, The Force Awakens
Introduction to Kotlin language, chapter I
Yury Camacho
June 03, 2017
More Decks by Yury Camacho
See All by Yury Camacho
Flutter 101
camachoyury
0
240
Programacion
camachoyury
0
110
Kotlin for Android Developers
camachoyury
0
140
Android Wear
camachoyury
0
34
Google Glass KickStart
camachoyury
0
47
Other Decks in Technology
See All in Technology
AIに丸投げしないトイル削減 / Eliminating Toil Without Leaving It All to AI
kohbis
4
1k
Tab5をRubyで動くパソコンにする
kishima
2
270
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
410
コスト最適化の「めんどくさい」を AWS FinOps Agent でチョット楽にする
classmethod_kaz
0
280
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
240
Screen Lens - 今見てる画面を翻訳する
komagata
0
140
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
210
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
120
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
4
920
AIで実装は速くなった。なのにプロダクトは速くならない。職能の壁を越えて価値のフローを設計する
nwiizo
7
7.5k
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
220
Snowflakeのコスト最適化を支えるアーキテクチャ設計
ktatsuya
0
890
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.2k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
370
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
470
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
230
Everyday Curiosity
cassininazir
0
310
The Cost Of JavaScript in 2023
addyosmani
55
10k
GitHub's CSS Performance
jonrohan
1033
470k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
560
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Transcript
Kotlin The Force Awakens @camachoyury
None
Android official support Kotlin
What is Kotlin? • JVM • Seems like Java •
Object Oriented • Functional • Less code than Java • No need Classes • Null safety
No need Classes fun main(args: Array<String>){ println("be the force with
you") }
Variables y mutability val name: String = "Kylo Ren" var
side = "Force" side = "Dark Side" name = "Kylo" //no compile!!!
Template String fun activateSable(color: String){ println("${color} Sable activate!!" ) }
“If” is so cool! var sable = true; println( if
(sable) { "Activate" }else { "Deactivated" })
Null Safety // error no compile var clone: String =
null //can not be a value of a non-null type String // could be null var clone2: String? = null clone2 = "clone" // I’m sure, clone2 is not null println( clone2!! )
Functions Extension functions
Functions • No need to be part of a class
• “fun” keyword for create a function • Default parameters • Named Parameters • Extension functions
Functions in kotlin fun sableActivated(character: Character) :Boolean { character.sable }
Default parameters class Character(name: String, sable: Boolean = false ){
val name = name; var sable = sable }
Named parameters var kylo = Character( sable = true, name
= "Kylo Ren")
Extension functions fun Character.showup(){ println(this.name) println( if (this.sable){ "Has sable"
}else "No sable" ) }
Extension functions fun String.printYourSelf(){ println(this) } "Force be with you".printYourSelf()
Infix functions infix fun Character.fight(character: Character){ println("fight beginig ${this.name} and
${character.name} ") } kylo fight rey
Clases class Character(name: String, sable:Boolean ){ val name = name;
var sable = sable }
Herencia open data class Character(var name: String, var sable:Boolean =
false ){ } class SecCharacter(name: String) : Character(name){ }
Bye bye POJO data class Character(var nombre: String, var sable:Boolean
= false ){} //function by default kylo.toString() kylo.hashCode() kylo.equals() //setters and getters by default kylo.name kylo.sable
Questions?
https://kotlinlang.org https://antonioleiva.com/ Links reference
None