ok, I ran and compiled this program so I am certain the answer is:
10 0
20
The confusion lies in the statement:
ValHold vh = new ValHold();
v = vh;
Two ValHold objects have been created( hence the v.i = 10 part ), but I don't have a definate answer as to why the v.i in amethod() has the value of 20 when another() completes.
My guess is that the first object's v.i was changed to 20 in another, but the second object's v.i was changed after creation leaving the first object's v.i unchanged. However, the cariable v seems to reference 2 obects( I think ) and I don't even know if this is possible. Somewhere the 2 objects have different values, but the same reference. I really want to know the answer to this, so please, please anyone correct me / us.
Thank you for listening to my confusion.