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
75
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
65
Simplify State management in Spring Boot with HATEOAS and KFSM
corneil
0
360
A Kotlin DSL for finite state machines
corneil
0
750
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
670
Reactive Spring 5
corneil
1
160
Resilient Applications using Spring Cloud
corneil
1
130
Other Decks in Programming
See All in Programming
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
今から始めるClaude Code超入門
448jp
8
8.6k
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.8k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
Grafana:建立系統全知視角的捷徑
blueswen
0
330
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
組織で育むオブザーバビリティ
ryota_hnk
0
170
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
ThorVG Viewer In VS Code
nors
0
770
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Side Projects
sachag
455
43k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Leo the Paperboy
mayatellez
4
1.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Docker and Python
trallard
47
3.7k
Google's AI Overviews - The New Search
badams
0
900
Balancing Empowerment & Direction
lara
5
880
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
730
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/