From Java to Kotlin – Part II: Boring Data Classes
Considering a move to Kotlin? Coming from a Java background? In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin. While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.
Case 2: You need a simple object.
Just data. No behavior. No clever tricks.
And yet, Java somehow turns this into a small project.