fork(2) download
  1.  
  2. class MyClass {
  3. public static void main(String args[]) {
  4. int i = 0;
  5. int j = 0;
  6.  
  7. int a = i++; // a = 0, i = 1
  8. int b = ++j; // b = 1, j = 1
  9. System.out.println("i = " + i);
  10. System.out.println("j = " + j);
  11. System.out.println("a = " + a);
  12. System.out.println("b = " + b);
  13. }
  14. }
  15.  
Success #stdin #stdout 0.04s 4386816KB
stdin
Standard input is empty
stdout
i = 1
j = 1
a = 0
b = 1