Comparison operators

Comparison operators in Java tests for equality, inequality, less than or greater than.
The result of any of the operators evaluates to a boolean value.
These are the operators:

The comparison operators are used to compare numbers or characters. They are rarely used to compare objects including String objects.
If used to compare objects or Strings, it checks whether the two variables refer to the same object instance.
If you want to compare one String with another, use the equals() or compareTo() methods of the String class.

Search for more Java info on this site here:
Custom Search

Any thoughts or questions?