This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Here on calling b.toString() in b1.toString() == b1.toString() we get two different String object because call to toString() is done at run time.so == should result in false.Please correct me iff i am wrong [ September 28, 2005: Message edited by: agrah upadhyay ]
Joined: Sep 01, 2005
Haa Haa Haa With above posting i have completed my 101 posts
yes! you are using only one reference b; However keep in mind b.toString() returns a new String object, everytime it has been called. That is why the actual checking here is between the reference returned by two b.toString(), which are different.