Kotlin — Command Reference
Kotlin's most used commands — modern, safe, fully compatible with Java. Android's official language. (For reference/educational purposes on this platform; examples must include explanations.)
7 categories · 15 commands
🖥️
Output
println and string templates.
println()String template ( $ )📦
Variables & Types
val, var, and type conversion.
val / vartoInt() / toString()🔢
Numbers & Math
Operators and math.
Math operatorsMath.sqrt() / Math.pow()✍️
String
Length, casing, search, and splitting.
.length / .uppercase().contains() / .replace() / .split()📚
Collection
List and Map.
listOf / mutableListOfmapOf / mutableMapOf🔀
Condition & Loop
if/else, for, and while.
if / elsefor (in)while🧩
Function
fun, single-expression, and lambda.
fun (function)Lambda ( { -> } )