String length()函数
Returns the length of this string. The length is equal to the number of 16-bit Unicode characters in the string.
"aaa".length() = 3;
"你好呀".length() = 3;
"aaa你好呀".length() = 6;
JAVA采用Unicode,字母,汉字的长度都是1
String length()函数
Returns the length of this string. The length is equal to the number of 16-bit Unicode characters in the string.
"aaa".length() = 3;
"你好呀".length() = 3;
"aaa你好呀".length() = 6;
JAVA采用Unicode,字母,汉字的长度都是1