what is the Difference between
String str=new String(\"Thamilan\");
and
String str=\"Thamilan\";
in java
In first case new object will be created always, in second case object from a string pool can be reused. Read more about String pool here: What is String pool?