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
Converting Java to Kotlin - Bring your own code
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Corneil du Plessis
July 24, 2019
Programming
85
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Converting Java to Kotlin - Bring your own code
The presentation that accompanied the workshop at I Code Java '19
Corneil du Plessis
July 24, 2019
More Decks by Corneil du Plessis
See All by Corneil du Plessis
Sweet Streams (Are made of this)
corneil
0
94
Simplify State management in Spring Boot with HATEOAS and KFSM
corneil
0
380
A Kotlin DSL for finite state machines
corneil
0
780
KFSM - A Kotlin DSL for Finite State machines
corneil
2
1.3k
Logging isn't free
corneil
1
160
The JDK beyond Oracle
corneil
0
170
Spring Fu a quick introduction
corneil
1
700
Reactive Spring 5
corneil
1
170
Resilient Applications using Spring Cloud
corneil
1
140
Other Decks in Programming
See All in Programming
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
170
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
220
バグを直したら useEffect が消えた
colorful12
3
780
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.8k
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.4k
業務時間外もAIに働いてもらう話
colorful12
2
9k
Dockerfile CMD for Node.js
grazie1999
0
150
Go 1.27 における memory allocation の高速化
andpad
0
350
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
470
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
不幸な GC
chencmd
0
820
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
180
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
310
From π to Pie charts
rasagy
0
330
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
490
Producing Creativity
orderedlist
PRO
348
40k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
[SF Ruby Conf 2025] Rails X
palkan
2
1.3k
WENDY [Excerpt]
tessaabrams
12
39k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Transcript
Workshop Converting Java to Kotlin Corneil du Plessis @corneil Bring
your own code.
None
Agenda • Brief overview of Kotlin • Converting Ping Pong
TDD – Roman Numerals, more... • Bring your own code. • Questions and Discussions • Java Interoperability • Interesting language features
Kotlin Overview • Improve readability • Reduce cognitive load •
Functional and Object Oriented • Immutability
Kotlin – Functional and Object-Oriented
Zoom
Zoom
Zoom
Zoom
Kotlin – Functional and Object-Oriented
Kotlin – Data Class
Kotlin - Functions
Kotlin – Scope functions Name Invocation It / this Lambda
result or object let receiver.let {} it {} with with(receiver) {} this {} run receiver.run {} this {} apply receiver.apply {} this receiver also receiver.also {} it receiver
Converting code • Converting Ping Pong TDD • Strap in....
Converting – Add dependencies
Kotlin – Maven Dependencies
Kotlin – Maven Plugins • https://gist.github.com/corneil/fdbac43fbc2b0909ea0cb6a0d0fd146a
Kotlin – Maven Plugin
Kotlin – Maven Java Plugin configuration
Interesting Kotlin features – Java interoperability • @JvmName • @get:JvmName
• @set:JvmName • @JvmStatic • @JvmField • @JvmOverloads • @JvmDefault • @Throws • @JvmSuppressWildcards • @JvmMultifileClass
Kotlin - @JvmOverloads
Kotlin - Destructuring Declarations
Kotlin – Delegated Properties • lazy • Non-Primitives. • notNull
• Primitives • observable • Lambda is invoked when modified • vetoable • Lambda can prevent an update by returning false
Kotlin –Delegated Properties
Kotlin - Delegation
Resources • Kotlin https://kotlinlang.org/ • Kotlin Reference https://kotlinlang.org/docs/reference/ • Kotlin
Playground https://play.kotlinlang.org/ • Tutorials https://kotlinlang.org/docs/tutorials/ • More https://kotlinlang.org/docs/resources.html • Awesome Kotlin https://kotlin.link/