classTrimTest{publicstaticStringmethod1(String s1){char[] c1= s1.toCharArray();//1.把接收到的字符串转换喂char[]型数组ints=0,w=0;//2.定义“头”角标和“尾”角标String s2=" ";//3.定义一个空格字符串char[] kong= s2.toCharArray();//4.转换为char[]型//5.for循环求第一个非空格元素...
class TrimTest{ public static String method1(String s1){ char[] c1= s1.toCharArray();//1.把接收到的字符串转换喂char[]型数组 int s=0,w=0;//2.定义“头”角标和“尾”角标 String s2=" ";//3.定义一个空格字符串 char[] kong= s2.toCharArray();//4.转换为char[]型 //5.for循环求...