This code...
public String a() {
String x = "abc";
String y = x.substring(3,3);
return y; //returns : ""
}
Works without errors but i thought there is no 3rd index for that string.As i understand indexes of strings like 1st char is 0 index ,2nd char 1 index,it goes like that.Then why is not that giving me a error like "OutOfBoundsException"?