fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. class Ideone
  8. {
  9. public static void main (String[] args)
  10. {
  11. int a = 5;
  12. int b = ++a++;
  13. int c = (++a)++; // Distinto error
  14. int d = ++(a++); // Mismo error
  15. }
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:13: error: unexpected type
        int b = ++a++;
                   ^
  required: variable
  found:    value
Main.java:14: error: unexpected type
        int c = (++a)++;
                 ^
  required: variable
  found:    value
Main.java:15: error: unexpected type
        int d = ++(a++);
                    ^
  required: variable
  found:    value
3 errors
stdout
Standard output is empty