Java OCA OCP Practice Question 1222

Question

What is the value of -31 >> 5 >> ?

public class Main {
   public static void main(String[] args) {

      System.out.print(-31  >> 5 >> 5);
   }
}
  • A. NaN
  • B. -1
  • C. 3
  • D. 1024


B.

Note

The expression returns a valid integer result, so answer A is eliminated.




PreviousNext

Related