Advertisement
Guest User

JennyQuestion

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