String a = "x"; then String x = a.substring(1) Wouldn't there be an error like indexOutOfRange? : <p>I am so confused. I thought to use str.substring(1), str has to be at least 2 characters, otherwise there should be index of of bound. But when I typed in, Java doesn't give any error. Why?</p>
