fork(1) download
  1.  
  2. class Example
  3. {
  4. public static void main (String[] args) throws Throwable
  5. {
  6. new B();
  7. }
  8. }
  9.  
  10. class A
  11. {
  12. public A()
  13. {
  14. System.out.println("Debug Info: " + getResource());
  15. }
  16. public String getResource()
  17. {
  18. return "A's resource";
  19. }
  20. }
  21.  
  22. class B extends A
  23. {
  24. private String res = "B's resource";
  25. @Override
  26. public String getResource()
  27. {
  28. return res;
  29. }
  30. }
  31.  
Success #stdin #stdout 0.06s 380224KB
stdin
Standard input is empty
stdout
Debug Info: null