Can any one tell me why Java provides two types of string Creation?
1. String s = "abc";
2. String s1 = new String("abc");
1. String s = "abc"; --- Will create the string object or literal. But why Java provides this way of creating the String.
This way of creating an Object is only with String class not with any other Class.