Equality Operator
Definition:
There are two equality operators used to determine whether equality or inequality exists between two operands:
Both operators return a boolean value; true if the result of the equality operation is correct, otherwise false.
Examples:
There are two equality operators used to determine whether equality or inequality exists between two operands:
== is equal to. != is not equal to.
Both operators return a boolean value; true if the result of the equality operation is correct, otherwise false.
Examples:
int value = 10;//does the value variable equal ten? boolean isEqual = value == 10;//does the value variable not equal ten? boolean isNotEqual = value != 20;//Normally they are used as part of a control flow statement if (value == 10) { System.out.println("Yay, the value is 10"); }
Glossary:
#ABCDEFGHIJKLMNOPQRSTUVWXYZ
Source...