Purpose of this chapter.
We will learn about the operators which is the elements that make up the expression.
Operation to instances.
An operator is a symbol that specifies the operation to be performed on an instance. The operator performs an operation on the operand and returns an instance of the result.
Operators have precedence. Expressions that contain multiple operators are computed from operators with higher priorities.
The following is a list of operators. The smaller the group number is the higher the priority. Operators of the same group have the same priority. If operators with the same priority are adjacent, the operation is executed in order from the left of the expression.
|()||x(y)||method call operator|
|new||new int()||new operator|
|+||+x||unary + operator|
|-||-x||unary - operator|
|!||!x||logical negation operator|
|*||x * y||multiplication operator|
|/||x / y||division operator|
|%||x % y||remainder operator|
|+||x + y||addition operator|
|-||x - y||subtraction operator|
|<||x < y||less than operator|
|<=||x <= y||less than or equal operator|
|>||x > y||greater than operator|
|>=||x >= y||greater than equal operator|
|==||x == y||value equality operator|
|!=||x != y||value inequality operator|
|$$||x $$ y||reference equality operator|
|!$||x !$ y||reference inequality operator|
|&||x & y||logical AND operator|
||||x | y||logical OR operator|
Let's explain the operators of each group in the following chapter.