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 A
  11. {
  12. void test()
  13. {
  14. System.out.println("Testujemy");
  15. lol();
  16. }
  17.  
  18. void lol()
  19. {
  20. System.out.println("Metoda z klasy A");
  21. }
  22. }
  23.  
  24. static class B extends A
  25. {
  26. @Override
  27. void lol()
  28. {
  29. System.out.println("Metoda z klasy B");
  30. }
  31. }
  32.  
  33. public static void main (String[] args) throws java.lang.Exception
  34. {
  35. new A().test();
  36. new B().test();
  37. }
  38. }
Success #stdin #stdout 0.1s 320576KB
stdin
Standard input is empty
stdout
Testujemy
Metoda z klasy A
Testujemy
Metoda z klasy B