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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Corneil du Plessis
July 24, 2019
Programming
0
78
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
68
Simplify State management in Spring Boot with HATEOAS and KFSM
corneil
0
360
A Kotlin DSL for finite state machines
corneil
0
760
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
140
Spring Fu a quick introduction
corneil
1
680
Reactive Spring 5
corneil
1
160
Resilient Applications using Spring Cloud
corneil
1
130
Other Decks in Programming
See All in Programming
AI活用のコスパを最大化する方法
ochtum
0
110
AHC061解説
shun_pi
0
260
20260228_JAWS_Beginner_Kansai
takuyay0ne
4
360
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
200
Raku Raku Notion 20260128
hareyakayuruyaka
0
420
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
130
浮動小数の比較について
kishikawakatsumi
0
360
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
220
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
200
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
110
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
180
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
5.8k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
150
4 Signs Your Business is Dying
shpigford
187
22k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Ethics towards AI in product and experience design
skipperchong
2
210
Everyday Curiosity
cassininazir
0
140
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
82
We Have a Design System, Now What?
morganepeng
55
8k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
220
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/