length用于求String字符串数组的长度,length()用于求String字符串对象的长度
length是求字符串数组中有多少个字符串,length()是求String字符串对象中字符的个数
String[] example = new String[5];
for(int i = 0;i<5;i++){
example[i] = new String("123123123123");
}
int a = example.length;//length用于求String字符串数组的长度
int b = example[0].length();//length()用于求String字符串对象的长度
System.out.println(a);//5
System.out.println(b);//12