Bapa

Untitled

Mar 17th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. class X
  2. {
  3. Y b = new Y();
  4.         X()
  5.   {
  6.   System.out.print("X");
  7.   }
  8. }
  9.  
  10. class Y
  11. {
  12.         Y()
  13.                 {
  14.   System.out.print("Y");
  15.                 }
  16. }
  17.  
  18. public class Z extends X
  19. {
  20.         Y y = new Y();
  21.  
  22.         Z()
  23. {
  24. System.out.print("Z");
  25. }
  26.  
  27.         public static void main(String[] args)
  28.   {
  29.                 new Z();
  30.         }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment