This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
i know this code was posted before the answer is 4 but i want to know how do we get 20 in the end didnt we assigned the vh to v so v must also be referring to object referenced by v so value must be 10
dude the variable v in your method dies after the another method gets over....but in your amethod the variable v is the one you declared in your amethod....
that is, another method variable v and amethod method v are different
scjp 1.6 91%, preparing for scmad
"Time to get MAD now.. we will get even later"....by someone unknown