Manfred,
From Anshuman example, the variable "i" doesn't exist outside the for() loop. The scope of the variable "i" is only valid inside the for() block.
I think the answer is 11, because the "temp" variable isn't valid outside the for loop either. To
test my theory, I wrote the following program.
Here's the output:
If temp was still a valid reference, then the finalize() method wouldn't have been invoke for foo(0).
-Peter