Java Reference
In-Depth Information
Step 3 in evaluating the new-expression is to yield the name of the newly
created folder, a9 , as the value of the expression.
After evaluation of the new-expression, its value, a9 , is stored in variable d .
Since the assignment statement is finished, the program counter is incremented.
The result is shown in Fig. 3.17(g); we also placed folder a9 in Fig. 3.17(g).
Coordinates: 1
a9
8
8
5
5
m: 1
C
C
m: 1
C
m: 1
d
d
d
null
null
null
(a) before the call
(b) after pushing argument values
(c) frame is complete
Coordinates: 1
Coordinates: 3
a9
a9
y
y
8
8
x
x
5
5
m: 1
C
m: 1
C
m: 1
C
d
d
d
null
null
null
(d) fixing the parameters
(e) after execution of method body
(f) frame is erased
a9
Coordinates
m: 2
C
Coordinates( int , int )
toString()
d
x5
y8
a9
(g) d has been assigned
Figure 3.17:
Steps in executing the constructor call
Search WWH ::




Custom Search