Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • That's a nice summary. Just as a further note when using String literals the behaviour is different again... String str0 = "Hello man!"; String str1 = "Hello man!"; str0 == str1; Would return true as the JVM places literal String objects within the String pool. Hence both str1 and str2 refer to the same object in the pool. Commented May 5, 2010 at 15:17
  • Nitpicking here, but two values are, by definition, never the same (otherwise, it would only be one value). Commented May 5, 2010 at 23:16