Assignment + Equality and Relational Operators
Welcome! This page will teach you about Equality and Relational Operators as well as the Assignment Operator.
What is an Operator?
Operators within Java are signs used to manipulate a variable. Depending on what type of Operator is in use will determine the outcome.
What is an Equality and Relational Operator?
Equality and Relational Operators are used to check if a variable is a value. You can use one of these operators to check if the value of a variable is the exact same as another value or if it is within a range of values (see example below).
What is an Assignment Operator?
Unlike Equality and Relational Operators, there is only one operator for the "Assignment Operators" category. The only sign used for assignment is a single equals sign.
All Operators List:
Here is a list of all possible Equality and Relational Operators as well as the single Assignment Operator...
|=||set equal to|
Equality and Relational Operators:
|!=||not equal to|
|>=||greater than or equal to|
|<=||less than or equal to|
Here is an example of setting a new variable integer named "ch" equal to 5, then checking if its;
equal to 3, greater than 3 or less than 3.