You can easy way to convert any java (MainActivity.java) file to kotlin (MainActivity.kt)
Open Your java file and press Shift twice to open search window and start typing action name “Convert Java F”. Select this option “Convert Java File to Kotlin File” from list and press enter.
If you working with java base project than you need also configure kotlin in your existing project.
For more Information visit kotlin-android