Listing 1. The controlling class.
public class InnerClasses07{

  static long baseTime = 
                    new Date().getTime();

  public static void main(String[] args){
    new A().meth();
  }//end main
}//end class InnerClasses07

The baseTime static variable

baseTime is initialized with the current date and time in milliseconds.

baseTime is used later as a base

The main method

main instantiates a new object of class A and invokes meth on that object.

Two objects of class B

meth sequentially instantiates two separate objects of local class B.

Then meth invokes showB on each of those objects,

The top-level class named X

Listing 2 shows the top-level class named X.

Class A extends this class to illustrate the difference between the inheritance hierarchy and the containment hierarchy.

Listing 2. The top-level class named X.
class X{
  protected int xVar = 1000;
}//end class X