fork download
  1. class Accenture
  2. {
  3. String s = name();
  4. String name()
  5. {
  6. return "Accenture High Performance Delivered !!";
  7. }
  8. }
  9. class Acc1 extends Accenture
  10. {
  11. String string = super.s;
  12. String name()
  13. {
  14. return "Consulting Outsourcing";
  15. }
  16. }
  17. class Acc
  18. {
  19. public static void main(String[] args)
  20. {
  21. Accenture acc1 = new Accenture();
  22. System.out.println(acc1.s);
  23. }
  24. }
  25.  
Success #stdin #stdout 0.07s 54596KB
stdin
Standard input is empty
stdout
Accenture High Performance Delivered !!