Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
0
73
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
Tweet
Share
More Decks by Corneil du Plessis
See All by Corneil du Plessis
Sweet Streams (Are made of this)
corneil
0
64
Simplify State management in Spring Boot with HATEOAS and KFSM
corneil
0
350
A Kotlin DSL for finite state machines
corneil
0
750
KFSM - A Kotlin DSL for Finite State machines
corneil
2
1.2k
Logging isn't free
corneil
1
130
The JDK beyond Oracle
corneil
0
140
Spring Fu a quick introduction
corneil
1
670
Reactive Spring 5
corneil
1
160
Resilient Applications using Spring Cloud
corneil
1
130
Other Decks in Programming
See All in Programming
sbt 2
xuwei_k
0
220
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
110
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.4k
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
140
全員アーキテクトで挑む、 巨大で高密度なドメインの紐解き方
agatan
8
19k
20 years of Symfony, what's next?
fabpot
2
320
React Native New Architecture 移行実践報告
taminif
1
140
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
150
チームをチームにするEM
hitode909
0
250
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
6.7k
AIコーディングエージェント(NotebookLM)
kondai24
0
150
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
330
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
BBQ
matthewcrist
89
9.9k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
380
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
A Tale of Four Properties
chriscoyier
162
23k
4 Signs Your Business is Dying
shpigford
186
22k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.1k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
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/