AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Kotlin to java4/22/2023 In Kotlin, we can’t assign null values to variables or return values if we really want to assign, then we can declare a variable with a special syntax, whereas in Java, we can assign null values but when we try to access objects pointing to null values raises an exception.Java compilation time is 15-20% faster than Kotlin compilation time, but in the perspective of incremental build compilation, Kotlin will also take the same compilation time as Java.In Kotlin, we don’t have checked exceptions, which is a disadvantage as it leads to error prone-code, whereas Java has support for checked exceptions by which we can perform error handling.Kotlin has the support of type inference, which means we don’t need to explicitly specify the data type of variable explicitly, whereas, in Java, we need to explicitly specify.Kotlin has the support of smart cast, which identifies immutable types and performs implicit cast by a compiler, whereas in Java, we need to identify and perform the casting.
0 Comments
Read More
Leave a Reply. |