fork download
  1. #include <iostream>
  2. using namespace std;
  3. public class test
  4. {
  5. public static void main(String args[])
  6. {
  7. int x = 0, y = 1, z;
  8. if(x)
  9. z = 0;
  10. else
  11. z = 1;
  12. if(y)
  13. z = 2;
  14. else
  15. z = 3;
  16. System.out.println(z);
  17. }
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:1: error: expected unqualified-id before ‘public’
 public class test
 ^~~~~~
stdout
Standard output is empty