fork download
  1. public class myinter
  2. {
  3. int x;
  4. abstract void display();
  5. }
  6. class A extends myinter
  7. {
  8. public void display()
  9. {
  10. x=10;
  11. System.out.println("Implementing display method");
  12. }
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class myinter is public, should be declared in a file named myinter.java
public class myinter
       ^
1 error
stdout
Standard output is empty