Chapter 32 JAVA Flashcards
In Java, the short-circuit AND operator is
&&
The non-short-circuit AND operator is
&
The short-circuit OR operator is
||
The non-short-circuit OR operator is
|
The NOT operator is
!
Examine the following sets of operators:
! (unary)- * / \+ - < <= > >= == != && || Which operators have the HIGHEST precedence? \_\_\_\_\_\_\_\_\_\_\_\_\_ Which operators have the LOWEST precedence? \_\_\_\_\_\_\_\_\_\_\_\_\_ .
! (unary)
&& ||
- In the following expression, which operator is done first: 4+7*3 < 12
*
.1+2 > 5-2 && 12 < 23 evaluates to true/ false .
false
1+2 > 4-2 || Math.sin(1.5) >= Math.cos(0.34) evaluates to
true/ false
true
1+1 > 4-2 && 12 < 23 && ‘a’ == ‘a’ evaluates to
true/ false
false
1 > 4-2 || 23 > 13 && 8 < 10 evaluates to
true/ false .
true
(9 <= 34 || 5 > 25 ) && 7 < 20 evaluates to
true/ false
true
9 <= 34 || 5 > 25 && 7 < 20 evaluates to
true/ false .
true
9 <= 34 && 5 > 25 || 7 < 20 evaluates to
true/ false .
true
9 <= 34 && 5 > 25 && 7 < 20 evaluates to
true/ false .
false