Kotlin Operators
Arithmetic, relational, logical, assignment and Kotlin's special 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.
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.
Comparison Operators in Kotlin
Comparison operators are used for comparing numbers. A Kotlin example with source code and sample output.
Elvis Operator (?:) in Kotlin
This operator is used for null safety in Kotlin. A Kotlin example with source code and sample output.
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.
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.
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.
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.
Kotlin Operators Overview in Kotlin
Operators Overview explained in Kotlin, with a complete example program, its sample output, and a clear code walkthrough.
Logical Operators in Kotlin
These operators are used mainly to check conditions. A Kotlin example with source code and sample output.
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.
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.
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.
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.
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.