Member-only story

Kotlin features that makes me happy as Java Developer

Kotlin’s features liked by Java Developer

Egor Voronianskii
3 min readAug 29, 2024
Kotlin logo

Introduction

The programming world continues to evolve, developer quite often seek languages that offer new one languages that are simple and powerful. Among modern JVM languages Kotlin has emerged as strong contender for those transitioning from Java. In this article I will highlight several Kotlin features that make me really happy

Type safety

Like a Java the Kotlin has static typing. Comparing with Java where nullability is often handled at runtime the Kotlin enforces strict nullability rules by default. It is means that variables must explicitly declare if the can be null this leads to reducing the risk of null pointer exceptions and making the code more predictable.

val a: String? //Can be null
val b: String //Cannot be null

Null safety

One of Kotlin’s most powerful feature for Java developers is its null safety mechanism. Kotlin automatically handles null values with a smart way to deal with them, allowing for safer coding practices without need for explicit null checks in many cases.

Conciseness

--

--

Egor Voronianskii
Egor Voronianskii

Written by Egor Voronianskii

I am a Software Engineer, JVM enthusiast, cat - lover, part-time surfer.

No responses yet