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
230
Programacion
camachoyury
0
110
Kotlin for Android Developers
camachoyury
0
140
Android Wear
camachoyury
0
32
Google Glass KickStart
camachoyury
0
45
Other Decks in Technology
See All in Technology
SONiCで構築・運用する生成AI向けパブリッククラウドネットワーク ~実装編~
sonic
0
290
マルチアカウント環境での コーディングエージェントを使った障害調査が大変なので AIエージェントにReadOnly権限を付与してみた / ReadOnly AI Agents for Multi-Account AWS Incident Response
yamaguchitk333
2
120
Flow 不死:AI 時代 DevOps 的不變本質
cheng_wei_chen
2
360
MUSUBI 田中裕一『AIと共に行う「しごとのリデザイン」- スモールバックオフィス編』AI Ops Lab #4
musubi
0
280
Kiro Ambassador を目指す話
k_adachi_01
0
110
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
3k
脆弱性対応、どこで線を引くか
rymiyamoto
1
420
就職⽀援サービスにおけるキャリアアドバイザーのシフトスケジューリング
recruitengineers
PRO
1
150
OTel × Datadog で 「AI活用」を計測し、改善に繋げる
shihochan
2
460
【NRUG vol.18】KubernetesにおけるNew Relicデータ取得量削減の考え方
nrug_member
0
170
10年間のブログ発信を振り返って見えたWebアプリケーションエンジニアとしての軌跡
stefafafan
0
170
人材育成分科会.pdf
_awache
4
300
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
How to train your dragon (web standard)
notwaldorf
97
6.7k
Navigating Team Friction
lara
192
16k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
210
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
170
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
250
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
240
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
260
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