Java Operator Precedence Question 1

Question

What is the output of the following code?


public class Main {
  public static void main(String args[]) {
    int a = 32;//from   w w w  .j  a  v a 2s.co  m
    int b = 1;
    int e = a >> b + 1  ;

    System.out.println(e);
  }
}


8

Note

In Java + is running before >> operator.




PreviousNext

Related