The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

string

Posted by mallepaddi sreedhar on April 17, 2000 at 3:16 AM

I am still puzzled for the 1st ?. Here is the answer 2 the 2nd ?

No , they r not of the same object.
However if s2="HelloWorld"; then they point to the same object.That is one of the features of the Java compiler object optimisation.
s1 and s2 r of different object.
Please refer to the javasoft FAQ for further details.
regards
sreedhar



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us