fork download
  1. class X {
  2. X(){
  3. System.out.println(1);
  4. }
  5. X(int x){
  6. this(); System.out.println(2);
  7. }
  8. }
  9.  
  10. class Y extends X {
  11. Y() {
  12. super(6);
  13. System.out.println(3);
  14. }
  15. Y(int y){
  16. this();
  17. System.out.println(4);
  18. }
  19. public static void main (String[] args)
  20. {
  21. new Y(5);
  22. }
  23. }
  24.  
Success #stdin #stdout 0.09s 52580KB
stdin
Standard input is empty
stdout
1
2
3
4