After Java and C++, Kotlin became the third language supported by Android. Code written in Kotlin is quite easy to understand, as it is precise and concise than Java.
I call it my billion-dollar mistake. It was the invention of the null reference in 1965…This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years. — Sir Charles Antony Richard Hoare
Kotlin will provide relief to Android developers as it solves the problem of run time exception and verbosity of the source code. It is very easy to start work on Kotlin and it is easy to introduce it in the existing project.
Therefore, it is time for the change and moves from Java to Kotlin provides better programming experience and better than in several ways.
Some of the disadvantages of Java are:
- NullPointerException error biggest flaw of Java.
- Most of the android application crashes because of NullPointerException error.
- Non-static Inner Classes implementation in Java.
- In addition, the Anonymous Inner Classes in Java leads to memory leaks as they make implicit reference to the other classes.
Some of the features of Kotlin:
- Interoperable with Java as it produces same byte code as Java does.
- No more NullPointerException.
- Runtime overhead is no more.
- Let you write less code.
- Data class availability help removing the overlapping code.