fork download
  1. class Person
  2. {
  3. void fun()
  4. {
  5. System.out.print("person class");
  6. }
  7. }
  8. class Student extends Person
  9. {
  10. void fun()
  11. {
  12. System.out.print("student class");
  13. }
  14. void display()
  15. {
  16. fun();
  17. super.fun();
  18. }
  19. }
  20. class Test
  21. {
  22. public static void main(String args[])
  23. {
  24. Student s = new Student();
  25. s.display();
  26. }
  27. }
Success #stdin #stdout 0.06s 32200KB
stdin
Standard input is empty
stdout
student classperson class