Tariee wrote:Hello

My question is, I thought once you try to change the value of the local variable itself, e.g s++ or s = a, the reference starts pointing to a new object. So how come in this question, cA[1] in m1() and cA[1] in m2() are still pointing to the same object when the following occurred in m2(): cA[1] = cA[0] = 'm';
What you say is true but there is an important point that you are missing.
cA is a reference to an array object. But the elements of that array are not references to other objects because this is an array of chars, which is a primitive. Therefore, cA[1] and cA[0] are not references. They are merely values. That is why, when you change cA[0], you are changing its value right there.
You should try running the same code after changing char arrays to Object arrays and then see what happens.
You may want to go through this article that explains the basic concept:
http://www.javaranch.com/campfire/StoryPassBy.jsp
HTH,
Paul.