Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
150
Android Wear
camachoyury
0
36
Google Glass KickStart
camachoyury
0
48
Other Decks in Technology
See All in Technology
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
170
WasmをRustにする
sansantech
PRO
0
250
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
1
120
エンタメ企業のM&Aを支えるデータ基盤 ― 統合から店舗のリアルタイム分析まで / Data Engineering Summit 2026
genda
0
170
1つのリクエストを追って理解する - llm-dのP/D分離
akhino
1
160
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
370
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.4k
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
130
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
Running Kotlin + Quarkus with Lambda
nealle
1
3.7k
How to Design Configuration for Rails Applications
willnet
1
740
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
850
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.3k
The Language of Interfaces
destraynor
162
27k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Producing Creativity
orderedlist
PRO
348
41k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
How to Ace a Technical Interview
jacobian
280
24k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
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