Kotlin Operators

Kotlin Operators

Operators are used to perform operations on variables and values. Kotlin divides operators into several groups.


1. Arithmetic Operators

Arithmetic operators are used to perform common mathematical operations.


2. Assignment Operators

Assignment operators are used to assign values to variables. The most common is the = operator. You can combine assignment with arithmetic operations (e.g., x += 5 is the same as x = x + 5).


3. Comparison Operators

Comparison operators are used to compare two values and return a Boolean (true or false). These are vital for conditional statements.