fork download
  1. interface A { public void method1(); }
  2.  
  3. interface B { public void method1(); }
  4.  
  5.  
  6.  
  7. public class Test implements A,B {
  8.  
  9. public void method1()
  10. {
  11.  
  12. }
  13.  
  14. }
  15.  
  16.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:7: error: class Test is public, should be declared in a file named Test.java
public class Test implements A,B {
       ^
1 error
stdout
Standard output is empty