kotlin-keywords-and-operators.md

#Keywords and Operators

Last modified: 04 May 2026


#Hard Keywords

The following tokens are always interpreted as keywords and cannot be used as identifiers:


#Soft Keywords

The following tokens act as keywords in specific contexts but can be used as identifiers in others:


#Modifier Keywords

These tokens act as keywords in modifier lists but can be used as identifiers elsewhere:


#Special Identifiers


#Operators and Special Symbols

SymbolDescription
+, -, *, /, %Mathematical operators (* is also for vararg spread)
=Assignment; also used for default parameter values
+=, -=, *=, /=, %=Augmented assignment operators
++, --Increment and decrement operators
&&, `
==, !=Structural equality (calls equals())
===, !==Referential equality
<, >, <=, >=Comparison operators (calls compareTo())
[, ]Indexed access operator (calls get/set)
!!Assert non-null
?.Safe call operator
?:Elvis operator (null-coalescing)
::Member or class reference
.., ..<Range creation
:Separates name from type in declarations
?Marks a type as nullable
->Separates parameters/body in lambdas, function types, and when
@Introduces annotations or references labels/scopes
;Statement separator
$String template variable/expression reference
_Unused parameter placeholder