paint-brush
Kotlin vs. Java: Which Is the Best When It Comes to Null Safety?by@nfrankel
103 reads

Kotlin vs. Java: Which Is the Best When It Comes to Null Safety?

by Nicolas Fränkel6mFebruary 16th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Kotlin and Java have different approaches to nullability. In Kotlin, every variable of type `X` can be 'null' and the compiler guarantees it. In Java, the compiler refuses to call members on possible null values, i.e., nullable types. Kotlin offers the same operator to achieve the same.
featured image - Kotlin vs. Java: Which Is the Best When It Comes to Null Safety?
Nicolas Fränkel HackerNoon profile picture
Nicolas Fränkel

Nicolas Fränkel

@nfrankel

Developer Advocate for Apache APISIX *** Learner *** Author of http://leanpub.com/integrationtest

About @nfrankel
LEARN MORE ABOUT @NFRANKEL'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Nicolas Fränkel HackerNoon profile picture
Nicolas Fränkel@nfrankel
Developer Advocate for Apache APISIX *** Learner *** Author of http://leanpub.com/integrationtest

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here