ch4 Flashcards

1
Q

For which types can you use the + operator?

A

numeric primitives, String concatenation

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

-= is a …?

A

compound operator

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

Relational operators always result in a …?

A

boolean

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

What happens if you use the instanceof operator accross different class hierarchies?

A

compiler error

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

How is % called?

A

remainder operator / modulus operator

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

Can you use the increment operator for a final variable?

A

No.

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

What is the difference between the & and && operators?

A

&&: short-circuit => No unnecessary evaluations.

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