📜  java代码示例中的子字符串

📅  最后修改于: 2022-03-11 14:52:25.196000             🧑  作者: Mango

代码示例3
public class Substring {
 
  public static void main(String[] args) {
    String s = "Hello Scaler!";
    /* Throws StringIndexOutOfBoundsException as endIndex is out of range of    string s */
    System.out.println(s.str.substring(1, 30));
  }
}