标签:tor private code nal unicode present string character 字符数组
一般会答: s.length()
看源码是如何实现的:
/**
* Returns the length of this string.
* The length is equal to the number of <a href="Character.html#unicode">Unicode
* code units</a> in the string.
*
* @return the length of the sequence of characters represented by this
* object.
*/
public int length() {
return value.length;
}
value就是一个字符数组, 即s.length()其实是调用char[]的length属性
/** The value is used for character storage. */
private final char value[];
标签:tor private code nal unicode present string character 字符数组
原文地址:https://www.cnblogs.com/52liming/p/10048154.html