This sort of question has been discussed hundreds of times. If you use the search facility of JavaRanch, you will find so many interesting discussion on this.
Hint: When you use new operator to create String object, object is created at run time. Without using "new" you call compile time created String object. Objects created with "new", gives false result when you use == to compare them even if the content is same. Because == compares references of the objects.