Java Operators: Jayson Angelo E. Vale Cruz
Java Operators: Jayson Angelo E. Vale Cruz
Operator Description
Operator Description
It increases the value of an operand
++
by 1
It decreases the value of an operand
--
by 1
Relational Operators
• These are operators that perform a comparison
between operands
Operator Description
It checks whether the left operand is
==
equal to the right operand
It checks whether if the left operand
>
is greater than the right operand
It checks whether if the left operand
<
is less than the right operand
It checks whether if the left operand
>= is greater than or equal the right
operand
It checks whether if the left operand
<= is less than or equal the right
operand
It checks whether the left operand is
!=
“not” equal to the right operand
Logical Operators
• These operators further expand the relational
operator since they add more control to it
Operator Description
An operator that returns true only
&&
when both operands are true
An operator that returns true when
||
at least 1 value is true
Operator Description