A relational operator is used to determine if there is a relationship between two data. Below is a list of relational operators in Java.
Operators
Meaning
Description
==
Equal to
This is used to affirm that the two values are equal.
!=
Not equal to
This is to signify that the two values are not equal.