Greetings people
I've hard time understanding a probably quite simple question. Yet I tried to discuss it with a friend but he was not of help , making him have doubts about ( bad luck ! )
This is the question :
At somepoint shouldn't JVM simply start
thread and execute it with run procedure (when it wants since we have no clue of whet it will be) , and change the reference of sName variable? I do understand
String are inmutable , no changes. But the loop inside run() procedure do have to start at some point so there , sName's reference changes, from it's first value to a new String. Even more, I believe sName loses its first reference due concatenation at first call of the setter method (nameTest(String sName) ) (besides the coincidence of naming parameter as static class variable ) .
Am I wrong? or it doesn't apply?. Perhaps I am not approaching the question in the right way.
Thank you for your time.