Me and my friend was discussing on Strings and we stuck on this:
String str = \"ObjectOne\"+\"ObjectTwo\";
He says total three Object will
String str = "ObjectOne"+"ObjectTwo";
3 objects will be created as
1- "ObjectOne"
2- "ObjectTwo"
3- "ObjectOneObjectTwo"
use
StringBuffer tmp = new StringBuffer("ObjectOne"); tmp.append("ObjectTwo"); str = tmp.toString();