Photo by Louis Tsai on Unsplash
At first, I highly doubt using Kotlin with Android Studio would be good idea. A friend of mine shows me snippet of his code, and I gotta say :
Kotlin surely is another unique language
Let's see some of the examples. For this purpose, I created Android project with Empty Activity with Java as well with Kotlin.
This first example is MainActivity.kt
, the Main Activity of Android app but written in Kotlin:.
And here's the example of the same file, MainActivity
but in Java:
Right away, we saw two different style.