Hi Shabbir,
The result is false because:
"Strings computed at run time are newly created and therefore distinct. " -
Java Language Spec 3.10.5
So if you wrote:
String str = str1 + str2;
System.out.println(str == str3);
produces:
true
Since str references from the string pool - it either finds a reference to "Java" or adds it to the pool.
hope that helps,
Yoo-Jin.