Java operators
Operators are special symbols that perform specific operations on operands, and then return a result. The following are the operators supported by the Java programming language:
A simple assignment operator
=
: A simple assignment operator
Arithmetic operators
+
: An additive operator (also used for string concatenation)-
: The subtraction operator*
: The multiplication operator/
: The division operator%
: The remainder operator
Unary operators
+
: Unary plus operator; indicates positive value-
: Unary minus operator; negates an expression++
: Increment operator; increments a value by 1--
: Decrement operator; decrements a value by 1!
: Logical complement operator; inverts the value of a Boolean value
Equality and relational operators
==
: Equals to!=
: Not equal to>
: Greater than>=
: Greater than or equal to<
: Less than<=
: Less than or equal to
Conditional operators
&&
: Conditional AND operator||
: Conditional OR operator?
: Ternary operator
Type comparison operator
instanceof
...