Getting Started with Kotlin
It’s easy to get started with Kotlin using the Kotlin plugin integrated in IntelliJ IDEA. Benefit from code highlighting, code completion, refactoring, debugging, and other features available for Kotlin.
If you want to start from scratch, you can create a basic Kotlin application. Once you’ve created the application, you can dive deeper into Kotlin syntax:
- Add sample code from Kotlin examples
- Install the EduTools plugin for IDEA and complete exercises from the Kotlin Koans course
If you already have a Java project, you can:
- Start adding Kotlin code to your project.
Begin with a small class or function with the annotations required for proper interoperability with Java code.
- Write some tests in Kotlin for your code.
Tests are a safe place to add Kotlin to the codebase because they are not bundled with your application during packaging.
- Convert Java code to Kotlin.
Extract small pieces of Java functionality and convert to Kotlin classes and functions using the Java-to-Kotlin converter.