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
0
70
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
59
Simplify State management in Spring Boot with HATEOAS and KFSM
corneil
0
340
A Kotlin DSL for finite state machines
corneil
0
720
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
130
Spring Fu a quick introduction
corneil
1
650
Reactive Spring 5
corneil
1
150
Resilient Applications using Spring Cloud
corneil
1
130
Other Decks in Programming
See All in Programming
顧客の画像データをテラバイト単位で配信する 画像サーバを WebP にした際に起こった課題と その対応策 ~継続的な取り組みを添えて~
takutakahashi
4
1.4k
AI Ramen Fight
yusukebe
0
110
20250708_JAWS_opscdk
takuyay0ne
2
150
Claude Code + Container Use と Cursor で作る ローカル並列開発環境のススメ / ccc local dev
kaelaela
12
7.4k
副作用と戦う PHP リファクタリング ─ ドメインイベントでビジネスロジックを解きほぐす
kajitack
2
440
フロントエンドのパフォーマンスチューニング
koukimiura
6
2.3k
Caude codeで爆速開発
codelynx
0
100
型で語るカタ
irof
0
800
Understanding Kotlin Multiplatform
l2hyunwoo
0
110
オンコール⼊⾨〜ページャーが鳴る前に、あなたが備えられること〜 / Before The Pager Rings
yktakaha4
2
1.1k
Android 16KBページサイズ対応をはじめからていねいに
mine2424
0
650
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
1
220
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Six Lessons from altMBA
skipperchong
28
3.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
370
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Automating Front-end Workflow
addyosmani
1370
200k
How STYLIGHT went responsive
nonsquared
100
5.6k
Fireside Chat
paigeccino
37
3.5k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Embracing the Ebb and Flow
colly
86
4.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
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/