Important considerations
The important things to note about the output shown in Figure 9 include:
- The
second object instantiated from local class B is a different object from the
first object instantiated from local class B, as evidenced by a
different value for bTime. (Compare the value of
bTime in Figure 9 with the value of
bTime in Figure
5.) In other words, the second object was instantiated after the first
object was instantiated.
- Even though the two objects instantiated from local class B
are different objects, they both belong to the same containing object, as
evidenced by the same values for aTime in
Figure 9 and Figure
5.
- The two objects instantiated from local class B each
access the same final local variable belonging to
meth, as evidenced by the same values for methTime
in Figure 9 and Figure
5.
- The two objects instantiated from local class B each access the same
variables named xVar and yVar as evidenced
by the values shown in Figure 9 and Figure
5.