This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
S1 Before Append : Hello
S1 After Append : Hello How are you
S1 After S1=S2 : Doing
Final Output in Main Method : Hello How Are you.
Could you please explain me why it is NOT printing "Doing" in the last output (it has been changed to "doing" in the method myBuf() ?
In the statement "s1=s2", if s1 and s2 are local to the method myBuf(),
then why in the statement s1.append("how are you") , s1 is not local to the method myBuff().
I am a bit confused. A good explanation is GREATLY APPRECIATED.