fork download
  1. Interface I{
  2. int x =10;
  3. }
  4.  
  5.  
  6. public class B implements I{
  7. // x=100;
  8. System.out.println(+x);
  9. }
  10.  
  11. public class C{
  12. public static void main (String[]args){
  13. B b = new B();
  14. }
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
Interface I{
^
Main.java:3: error: class, interface, or enum expected
}
^
Main.java:8: error: <identifier> expected
System.out.println(+x);
                  ^
Main.java:8: error: illegal start of type
System.out.println(+x);
                   ^
Main.java:8: error: ')' expected
System.out.println(+x);
                    ^
Main.java:8: error: ';' expected
System.out.println(+x);
                     ^
6 errors
stdout
Standard output is empty