please see the following code.
String s = \"Monday\";
if(s.subString(0,3).equals(\"Mon\"){}
String s2 = new String(s.subString(0,3));
String s3 = s.subStrin
Note: As of Java 7 update 6 in Sun/Oracle's Java, it is no longer true that a String created by String.substring shares the parent's char array. It was decided that this optimization was rarely beneficial, and did not justify the cost and complexity of the offset and count fields.
Some links: