$30 off During Our Annual Pro Sale. View Details »
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
0
110
Kotlin, The Force Awakens
Introduction to Kotlin language, chapter I
Yury Camacho
June 03, 2017
Tweet
Share
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
27
Google Glass KickStart
camachoyury
0
40
Other Decks in Technology
See All in Technology
Bedrock AgentCore Evaluationsで学ぶLLM as a judge入門
shichijoyuhi
1
150
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.6k
Entity Framework Core におけるIN句クエリ最適化について
htkym
0
110
2025-12-18_AI駆動開発推進プロジェクト運営について / AIDD-Promotion project management
yayoi_dd
0
150
Identity Management for Agentic AI 解説
fujie
0
370
コンテキスト情報を活用し個社最適化されたAI Agentを実現する4つのポイント
kworkdev
PRO
1
1.8k
AIエージェント開発と活用を加速するワークフロー自動生成への挑戦
shibuiwilliam
4
810
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
ZOZOの独自性を生み出す「似合う4大要素」の開発サイクル
zozotech
PRO
0
120
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
1
740
接客歴・営業歴の方が長いエンジニアから見たre:Invent2025
yama3133
0
100
たまに起きる外部サービスの障害に備えたり備えなかったりする話
egmc
0
380
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
150
Speed Design
sergeychernyshev
33
1.4k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
180
How GitHub (no longer) Works
holman
316
140k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
0
160
A designer walks into a library…
pauljervisheath
210
24k
For a Future-Friendly Web
brad_frost
180
10k
Thoughts on Productivity
jonyablonski
73
5k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
100
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