Site icon AndroidRide

How to convert Java class to Kotlin in Android Studio

how to convert java class to kotlin in android studio

how to convert java class to kotlin in android studio

In this post, you will learn how to convert Java class to Kotlin in Android Studio. Google announced Kotlin as an official language for Android Development. When comparing Java with Kotlin, It has lots of advantages. But I am not going to talk about its advantages here.

If you are from Java and want to step into Kotlin world, But don’t know how to write your code in Kotlin. Don’t worry, Kotlin plugin helps to convert Java code to Kotlin in Android Studio. Just type your code in Java then use below steps

This is not 100% perfect, the Best way is to learn Kotlin on your own. But for beginners, This will help a lot to move forward with Kotlin.

If you are using below Android Studio 3.0, You must install Kotlin plugin. Then only below steps work. So go to this tutorial and install Kotlin plugin in Android Studio. Otherwise, Just read on.



Open any project in Android Studio, Here I have opened the HelloWorld App.

convert java class to kotlin android studio

Exit mobile version