Relational

Relational Operator

The equality and relational operators determine if one operand is greater than, less than, equal to, or not equal to another operand. The majority of these operators will probably look familiar to you as well. Keep in mind that you must use “==”, not “=”, when testing if two primitive values are equal.

Operator Description
== equal to
!= not equal to
> greater than
< greater than or equal to
>= less than
<= less than or equal to

 

Leave a comment

Your email address will not be published. Required fields are marked *

2 + twenty =

This site uses Akismet to reduce spam. Learn how your comment data is processed.