Home » JAVA Programming » Basic Operators » Question
  1. Which of these statements are incorrect?
    1. The right shift operator, >>, shifts all of the bits in a value to the right specified number of times
    2. The right shift operator automatically fills the higher order bits with 0
    3. The left shift operator, <<, shifts all of the bits in a value to the left specified number of times
    4. The left shift operator can be used as an alternative to multiplying by 2
    5. None of these
Correct Option: B

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.



Your comments will be displayed only after manual approval.