Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
740
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
目的で駆動する、AI時代のアーキテクチャ設計 / purpose-driven-architecture
minodriven
11
3.7k
WebRTC と Rust と8K 60fps
tnoho
2
1.3k
AI時代もSEOを頑張っている話
shirahama_x
0
200
How Software Deployment tools have changed in the past 20 years
geshan
0
25k
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
130
俺流レスポンシブコーディング 2025
tak_dcxi
2
3.6k
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
720
しっかり学ぶ java.lang.*
nagise
1
460
sbt 2
xuwei_k
0
120
なぜ強調表示できず ** が表示されるのか — Perlで始まったMarkdownの歴史と日本語文書における課題
kwahiro
12
7.5k
Herb to ReActionView: A New Foundation for the View Layer @ San Francisco Ruby Conference 2025
marcoroth
0
220
乱雑なコードの整理から学ぶ設計の初歩
masuda220
PRO
32
15k
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Code Review Best Practice
trishagee
73
19k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
How to train your dragon (web standard)
notwaldorf
97
6.4k
The Pragmatic Product Professional
lauravandoore
36
7k
Producing Creativity
orderedlist
PRO
348
40k
Embracing the Ebb and Flow
colly
88
4.9k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Scaling GitHub
holman
464
140k
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/