將現有 Java 程式碼轉換為 Kotlin

Android Studio 的 Kotlin 外掛支援將現有 Java 檔案轉換為 Kotlin 檔案。選擇 Java 檔案並呼叫操作將 Java 檔案轉換為 Kotlin 檔案:

StackOverflow 文件