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. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. static class B
  11. {
  12. public void A()
  13. {
  14. System.out.println("A");
  15. }
  16. }
  17. static interface I
  18. {
  19. public void A();
  20. }
  21. static class C extends B implements I
  22. {
  23. }
  24. public static void main (String[] args) throws java.lang.Exception
  25. {
  26. C c = new C();
  27. I i = c;
  28. i.A();
  29. c.A();
  30. }
  31. }
Success #stdin #stdout 0.08s 380160KB
stdin
Standard input is empty
stdout
A
A