Kotlin Operators
Arithmetic: + - * / %. Comparison: == != < > <= >=. Logical: && || !. == compares values and === compares references. Integer division drops the fraction.
Example
val a = 17; val b = 5
println("${a + b} ${a - b} ${a * b} ${a / b} ${a % b}")
println(17 / 5.0)
println(a > b && b > 0)Exercise
Remainder operator.
17 5
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.