Chapter 32 JAVA Flashcards

1
Q

In Java, the short-circuit AND operator is

A

&&

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The non-short-circuit AND operator is

A

&

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The short-circuit OR operator is

A

||

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The non-short-circuit OR operator is

A

|

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The NOT operator is

A

!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Examine the following sets of operators:

! (unary)- 
*   /
\+  -
<   <=  >  >= 
==  !=
&&   ||
Which operators have the HIGHEST precedence? \_\_\_\_\_\_\_\_\_\_\_\_\_
Which operators have the LOWEST precedence?  \_\_\_\_\_\_\_\_\_\_\_\_\_ .
A

! (unary)

&& ||

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. In the following expression, which operator is done first: 4+7*3 < 12
A

*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

.1+2 > 5-2 && 12 < 23 evaluates to true/ false .

A

false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

1+2 > 4-2 || Math.sin(1.5) >= Math.cos(0.34) evaluates to

true/ false

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

1+1 > 4-2 && 12 < 23 && ‘a’ == ‘a’ evaluates to

true/ false

A

false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

1 > 4-2 || 23 > 13 && 8 < 10 evaluates to

true/ false .

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

(9 <= 34 || 5 > 25 ) && 7 < 20 evaluates to

true/ false
A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

9 <= 34 || 5 > 25 && 7 < 20 evaluates to

true/ false .

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

9 <= 34 && 5 > 25 || 7 < 20 evaluates to

true/ false .

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

9 <= 34 && 5 > 25 && 7 < 20 evaluates to

true/ false .

A

false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

9 <= 34 || 5 > 25 || 7 < 20 evaluates to true/ false

A

true

17
Q

9 > 34 || 5 > 25 || 7 > 20 evaluates to

true/ false .

A

false

17
Q

9 > 34 || 5 > 25 || 7 > 20 evaluates to

true/ false .

A

false