1.length()是求字符串对象的长度
2.length是求字符串数组的长度
package day02_code.use_of_length;
public class LengthDifferent {
public static void main(String[] args) {
String s1 = new String("abcd");
String[] s2 = {"a", "b", "c", "d"};
System.out.println(s1.length());
System.out.println(s2.length);
}
}