Skip to main content

Kotlin Operators

Arithmetic, relational, logical, assignment and Kotlin's special operators.

1
Kotlin Operators

Arithmetic Operators (Mathematical Operators) in Kotlin

Arithmetic Operators (Mathematical Operators) explained in Kotlin, with a complete example program, its sample output, and a clear code walkthrough.

2
Kotlin Operators

Assignment Operators and Augmented Assignment Operators in Kotlin

Assignment Operator is nothing but the "equal to - =" operator. A Kotlin example with source code and sample output.

3
Kotlin Operators

Comparison Operators in Kotlin

Comparison operators are used for comparing numbers. A Kotlin example with source code and sample output.

4
Kotlin Operators

Elvis Operator (?:) in Kotlin

This operator is used for null safety in Kotlin. A Kotlin example with source code and sample output.

5
Kotlin Operators

Equality Operators (==, !=) and Referential equality Operators...

The equality operators are operators that check if the values that are compared are equal. A Kotlin example with source code and sample output.

6
Kotlin Operators

In Operator (in and !in) in Kotlin

In operators are mainly used in when statements or expressions to check if a value falls in a range or a collection.

7
Kotlin Operators

Indexed Access Operator [, ] in Kotlin

This operator replaces the ".get" method of lists and maps in Java. A Kotlin example with source code and sample output.

8
Kotlin Operators

Is Operator (is and !is) in Kotlin

Is operators are used to check if a variable is of a particular type or not(!is) in Kotlin. A Kotlin example with source code and sample output.

9
Kotlin Operators

Kotlin Operators Overview in Kotlin

Operators Overview explained in Kotlin, with a complete example program, its sample output, and a clear code walkthrough.

10
Kotlin Operators

Logical Operators in Kotlin

These operators are used mainly to check conditions. A Kotlin example with source code and sample output.

11
Kotlin Operators

Not Null Assertion(!!) Operator in Kotlin

This operator converts the type of a boxed variable to not-null type. A Kotlin example with source code and sample output.

12
Kotlin Operators

Range Operator (..) in Kotlin

This operator is used to mention a range of values inclusive of the from and to values. A Kotlin example with source code and sample output.

13
Kotlin Operators

Safe Call Operator (?.) in Kotlin

This operator helps in writing a program without NPEs (Null Pointer Exceptions) and is represented by (?.). A Kotlin example with source code and sample output.

14
Kotlin Operators

Unary Operators (Sign, Inverts, Increment, and Decrement) in Kotlin

Unary Operators (Sign Inverts Increment and Decrement) explained in Kotlin, with a complete example program, its sample output, and a clear code walkthrough.

15
kotlin operators

Operator Function Overloading in Kotlin

Kotlin lets you define how custom types respond to operators like + or ==. A Kotlin example with source code and sample output.

Related Topics

Search tutorials