This repo contains a bunch of basic examples useful to take first steps on Kotlin Programming Language and its features.
It contains:
- Hello World
- basics: variables, loops, ranges;
- functions: how use Kotlin Functions
- classes: Kotlin classes, Java class VS Kotlin class
- dataClasses: how to use data classes
- lambdas: how use lambdas in Kotlin
- nullableTypes: how Kotlin handle null variables
- exercises: a bunch of simple exercises
You need to install Kotlin and the IntelliJ platform:
- JetBrains IntelliJ IDEA Community: https://www.jetbrains.com/idea/download/
- Getting Started with Kotlin: https://kotlinlang.org/docs/tutorials/getting-started.html
- import this repo (do not use 'Open', use 'import project' instead)
- Docs: https://kotlinlang.org/docs/reference/
- Docs pdf version : https://kotlinlang.org/docs/kotlin-docs.pdf
- Free Udacity lessons: https://classroom.udacity.com/courses/ud9011/
- Kotlin in action paper book and e-book: https://www.manning.com/books/kotlin-in-action
You can run the examples in two ways: copy and paste each functions inside REPL or directly running main functions.
- Press Shift twice inside IntelliJ and type "Kotlin REPL":
- write your code inside the console then press
Ctrl + Enter
:
Should You have imported well this project, you can find a little green "play" icon on the left of each main function. Press that button to run main function
- Try Kotlin: https://try.kotlinlang.org
- Kotlin Koans: https://kotlinlang.org/docs/tutorials/koans.html
- Kotlin Koans using EduTools: https://kotlinlang.org/docs/tutorials/edu-tools-learner.html
- Exercism: https://github.com/exercism/kotlin