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
Corneil du Plessis
July 24, 2019
Programming
79
0
Share
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
76
Simplify State management in Spring Boot with HATEOAS and KFSM
corneil
0
370
A Kotlin DSL for finite state machines
corneil
0
770
KFSM - A Kotlin DSL for Finite State machines
corneil
2
1.3k
Logging isn't free
corneil
1
140
The JDK beyond Oracle
corneil
0
150
Spring Fu a quick introduction
corneil
1
680
Reactive Spring 5
corneil
1
170
Resilient Applications using Spring Cloud
corneil
1
140
Other Decks in Programming
See All in Programming
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
230
感情を設計する
ichimichi
5
1.5k
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
390
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
24
14k
実用!Hono RPC2026
yodaka
2
250
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
150
Swift Concurrency Type System
inamiy
1
540
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
280
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
290
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
240
Agentic Elixir
whatyouhide
0
380
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
730
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
180
Fireside Chat
paigeccino
42
3.9k
From π to Pie charts
rasagy
0
170
A Tale of Four Properties
chriscoyier
163
24k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
100
What's in a price? How to price your products and services
michaelherold
247
13k
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
We Have a Design System, Now What?
morganepeng
55
8.1k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.6k
How STYLIGHT went responsive
nonsquared
100
6.1k
We Are The Robots
honzajavorek
0
220
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
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/