计算:
1 public class test { 2 public static void main(String[] args) { 3 int a = 10 >> 1; 4 int b = a++; 5 int c = ++a; 6 int d = b * a++; 7 System.out.println("a = " + a); 8 System.out.println("b = " + b); 9 System.out.println("c = " + c); 10 System.out.println("d = " + d); 11 } 12 }
结果
1 a = 8 2 b = 5 3 c = 7 4 d = 35