Kotlin Fundamentals
Kotlin is a statically typed programming language used for JVM, Android, web, and native applications. Its concise syntax and explicit nullability help you model application code and handle absent values deliberately.
itProgramming languages | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Intro
Kotlin Fundamentals
Kotlin is a statically typed language with functions, classes, collections, and control flow. You can target the JVM, Android, the web, or native platforms. The language is not a framework: a useful program also needs a target platform, a build setup, and often libraries.
Kotlin's everyday mental model is types plus explicit intent. A type describes the values an expression can hold. val states that a reference cannot be reassigned. var permits reassignment. Type inference can omit a type annotation when the initializer makes the type clear, but the inferred type remains part of the program contract.
fun greeting(name: String): String = "Hello, $name"
val message = greeting("Mina")
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://kotlinlang.org/docs/basic-syntax.html
Supports
- Kotlin applications can use a main function as an entry point
- val cannot be reassigned, var can be reassigned, and Kotlin supports type inference
- Classes can declare constructor properties, classes are final by default, and open permits inheritance
- Kotlin supports lambda-based filter and map collection operations
- https://kotlinlang.org/docs/null-safety.html
Supports
- Kotlin distinguishes nullable and non-nullable types
- Safe calls return null for null receivers and Elvis expressions select an alternative
- Smart casts can follow null checks, safe casts return null on failure, and non-null assertions can throw on null
- https://kotlinlang.org/docs/collections-overview.html
Supports
- Lists are ordered and can repeat elements, sets hold unique elements, and maps have unique keys and mapped values
- Kotlin collection types have read-only and mutable interfaces
- A mutable collection held by val can still support write operations
- https://kotlinlang.org/docs/functions.html
Supports
- Kotlin functions can be top-level, local, members, or extensions
- https://kotlinlang.org/docs/inheritance.html
Supports
- Kotlin classes and members are final by default, open permits inheritance, and override is explicit
- https://kotlinlang.org/docs/coroutines-overview.html
Supports
- Suspending functions can pause and resume without blocking a thread
- Most coroutine features are provided by kotlinx.coroutines and builders run from a CoroutineScope
- https://kotlinlang.org/docs/coroutines-basics.html
Supports
- Documented coroutine work requires a suspending function, a scope, a builder, and a dispatcher
- https://github.com/Heapy/awesome-kotlin
Supports
- Awesome Kotlin is a curated Kotlin ecosystem list; no entry was included without a verified project destination
