//  Data Structures with Java by John R. Hubbard
//  Copyright McGraw-Hill, 2001
//  Example 3.3 on page 56
//  Assignment conversion

class X { int a; }
class Y extends X { int b; }

public class Ex0303
{ public static void main(String[] args) 
  { X x = new X();
    System.out.println("x.getClass() = "+ x.getClass());
    Y y = new Y();
    System.out.println("y.getClass() = "+ y.getClass());
    x = y;  // assignment conversion of x to type Y
    System.out.println("x.getClass() = "+ x.getClass());
  }
}
