Rahul Nair wrote:Agreed. However, the string variable's value always replaces to new one when we assign new value to it if i am not wrong. The value or the strValue must be pointing to some memory address which contains the updated variable value. Right?
Yes. But as I said, the value of the variable at the time the return statement is called is what is returned. The return statement puts this value on the stack ready to be returned, before the finally block is called. At this point there is no connection between the variable and the value that is going to be returned.