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
Java?.Kotlin!!
Search
sebastian tellez
May 26, 2017
Programming
0
89
Java?.Kotlin!!
Platica para el meetup de Kotlin nights en la CDMX
sebastian tellez
May 26, 2017
Tweet
Share
Other Decks in Programming
See All in Programming
Select API from Kotlin Coroutine
jmatsu
1
190
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
150
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
850
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
1
310
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
310
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
170
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
46
30k
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
880
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
390
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
330
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
800
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
240
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
670
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Writing Fast Ruby
sferik
628
61k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Why Our Code Smells
bkeepers
PRO
337
57k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Making Projects Easy
brettharned
116
6.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Transcript
Java?.Kotlin!! Sebastian Tellez @gorrotowi github.com/gorrotowi
Java?.Kotlin!! Kotlin es un lenguaje de programación desarrollado por JetBrains.
Es funcional, esta diseñado para correr sobre la JVM, Android y Web
Java?.Kotlin!! Funcional Lambdas 100% interoperable con Java (JVM) NullSafety
Java?.Kotlin!! Ryan (James) Gosling a.k.a Java father
Java?.Kotlin!!
Java?.Kotlin!!
Java?.Kotlin!!
Java?.Kotlin!! private String numberString; int number = Integer.parseInt(numberString); //java
Java?.Kotlin!!
Java?.Kotlin!! private String numberString; if(numberString != null){ int number =
Integer.parseInt(numberString); } private String numberString; int number = Integer.parseInt(numberString); //java
Java?.Kotlin!! var a: String = "abc" a = null //
compilation error var b: String? = "abc" b = null // ok
Java?.Kotlin!! var a: String = "abc" val sizeA = a.length
var b: String? = "abc" b = null // ok var sizeB = b.length //error: variable 'b' can be null
Java?.Kotlin!! if (b != null && b.length > 0) {
print("String of length ${b.length}") } else { print("Empty string") }
Java?.Kotlin!! var a: String = "abc" val sizeA = a.length
var b: String? = "abc" b = null // ok var sizeB = b.length //error: variable 'b' can be null
Java?.Kotlin!! var sizeB = b?.length
Java?.Kotlin!! ?:
Java?.Kotlin!! val l = if (b != null) b.length else
-1
Java?.Kotlin!! val l = b?.length ?: -1
Java?.Kotlin!! fun foo(node: Node): String? { val parent = node.getParent()
?: return null val name = node.getName() ?: throw IllegalArgumentException("name expected") // ... }
Java?.Kotlin!! private String numberString; if(numberString != null){ int number =
Integer.parseInt(numberString); } private String numberString; int number = Integer.parseInt(numberString); //java //Kotlin
Java?.Kotlin!! val aInt: Int? = numberString as? Int //Kotlin
Java?.Kotlin!! val listWithNulls: List<String?> = listOf("A", null) for (item in
listWithNulls) { item?.let { println(it) } // prints A and ignores null }
Java?.Kotlin!! val fooFighters = b!!.length
Java?.Kotlin!!
Java?.Kotlin!! https://kotlinlang.org/docs/reference/ https://fabiomsr.github.io/from-java-to-kotlin/index.html https://try.kotlinlang.org/
Java?.Kotlin!! Sebastian Tellez @gorrotowi github.com/gorrotowi GRACIAS!!