How Kotlin makes your Java code better
summary
Concrete examples show Kotlin replacing verbose Java patterns: a Java value object with constructor, getters, equals, hashCode and toString becomes a data class one-liner that passes the same tests; optional parameters and named args replace builders; nullability marked by ? and handled with the Elvis operator prevents NPEs so a Map lookup no longer throws; sealed classes plus when expressions give exhaustive, type-safe branching; val is immutable by default; IntelliJ conversion migrates Java class-by-class with build changes.
AI-written summary · about
chapters (14)
- 0:00Intro
- 2:09Contents
- 3:11Things that are good
- 5:48Good patterns
- 6:38Examples
- 6:48Value objects
- 11:22Parameters
- 14:52Null safety
- 21:58Immutability
- 26:07Handling cases
- 33:27Constructors
- 37:21Streams
- 44:57Summary
- 55:05More info
related talks
30mWhat can Kotlin do for me?
24mYou can do Better with Kotlin
49mWhy Kotlin is the better Java and how you can start using it
43mFrom Effective Java to Effective Kotlin
19m9 Java Patterns that Kotlin made obsolete
37mEffective Java with Groovy & Kotlin
50mKotlin is as awesome as you've heard. Here's why.
49mAn Introduction to Kotlin
