Discussion :: JAVA MCQs
- Which of these statements are incorrect?
A.
The left shift operator, <<, shifts all of the bite in a value to the left specified number of times.
|
B.
The right shift operator, >>, shifts all of the bite in a value to the right specified number of times.
|
C.
The left shift operator can be used as an alternative to multiplying by 2.
|
D.
The right shift operator automatically fills the higher order bits with 0.
|
Answer : Option D
Explanation :
The right shift operator automatically fills the higher order bit with its previous contents each time a shift occurs. This also preserves the sign of the value.
Be The First To Comment