split:用for循环时不要忘记是数组名.length package com.aaa; //split的用法把指定的字符串按指定的分割符进行分割,然后返回字符串 数组 public class fgsd { public static void main(String[] args) { String a = "this is my subject";// 结果显示少了个字母.对头了 String b[] = a.split(" m", 23); for (in…
package com.b; public class Cor { public static void main(String[] args) { String a = "this is my book"; String[] c = a.split(" "); for (int i = 0; i < c.length; i++) { System.out.println(c[i]); } } }…