Because in Java this code can crash your program i...
# getting-started
n
Because in Java this code can crash your program if
myVar
is null:
Copy code
String myVar = getItem();
myVar.toString();
Kotlin will just prevent you from running your program and warn you.
👍 1