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.  
  9. class Ideone
  10. {
  11. static class A extends B
  12. {
  13. void hello(){System.out.println("A");}
  14. }
  15. static class B extends C
  16. {
  17. void hello(){System.out.println("B");}
  18. }
  19. static class C
  20. {
  21. void hello(){System.out.println("C");}
  22. void main()
  23. {
  24. hello();
  25. return;
  26. }
  27. }
  28. public static void main(String [] args)
  29. {
  30. A a = new A();
  31. a.main();
  32. return;
  33. }
  34. }
Success #stdin #stdout 0.04s 4386816KB
stdin
Standard input is empty
stdout
A