第一个参数会截取,第二个参数不会截取 String a="12345"; a=a.substring(0, 1); System.out.println(a); 输出1 转载于:https://www.cnblogs.com/ywb2018/p/10074254.html