Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
6 Cards in this Set
- Front
- Back
!= (inequality)
|
Determines if one expression is not equivalent to another.
Example int a = 22; int b = 23; if (a != b) { println("variable a is not equal to variable b"); } Syntax value1 != value2 Parameters value1 int, float, char, byte, boolean, String value2 int, float, char, byte, boolean, String |
|
< (less than)
|
Tests if the value on the left is smaller than the value on the right.
Example int a = 22; int b = 23; if (a < b) { println("variable a is less then variable b "); } Syntax value1 < value2 Parameters value1 int or float value2 int or float |
|
<= (less than or equal to)
|
Tests if the value on the left is less than the value on the right or if the values are equivalent
Syntax value1 <= value2 Parameters value1 int or float value2 int or float |
|
== (equality)
|
Determines if two values are equivalent. The equality operator is different from the assignment operator.
Note that when comparing String objects, you must use the equals() method instead of == to compare their contents. See the reference for String or the troubleshooting note for more explanation. Example int a = 23; int b = 23; if (a == b) { println("variables a and b are equal"); } Syntax value1 == value2 Parameters value1 int, float, char, byte, boolean value2 int, float, char, byte, boolean |
|
> (greater than)
|
Tests if the value on the left is larger than the value on the right.
Example int a = 5; int b = 13; if (b > a) { println("variable b is larger the variable a"); } Syntax value1 > value2 Parameters value1 int or float value2 int or float |
|
>= (greater than or equal to)
|
Tests if the value on the left is larger than the value on the right or if the values are equivalent.
Example int a = 23; int b = 23; if (a >= b) { println("variable a is greater or equal to variable b ") } Syntax value1 >= value2 Parameters value1 int or float value2 int or float |