Access the containing object

Listing 14 uses regular syntax to gain access to the current object.

It uses special syntax to gain access to the containing object.

Listing 14 gets and displays

Listing 14. Access the containing object.
System.out.println("-3-");
System.out.println(
     "In showB, bTime = " + this.bTime);
System.out.println(
   "In showB, aTime = " + A.this.aTime);
File: dr.htm [Next] [Prev]