IntelliJ
Go to the android studio's navigation bar
go to code (close to file)
then scroll down to convert java to kotlin
Note that your code must be totally correct first: syntax errors mean you won't be able to convert
val name: String? = null
var lastName: String?
lastName = null
var firstName: String
firstName = null // Compilation error!!