charat

charat

 英

  • 网络截取一个字符;方法也会产生一个;指定位置字符

例句

Although the charAt implementation directly returns char primitives, the iterator implementation must box each char into a Character object.

charAt实现直接返回char迭代实现必须每个char装箱一个Character对象

Finally, it is remarkable that the performance of Rope. charAt is better than the performance of String. charAt.

最后非常明显:Rope.charAt性能String.charAt性能

A CharSequence provides only a single method for accessing its characters: charAt(x).

CharSequence提供一个方法访问字符charAtx)。

For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.

对于charAt这样方法索引等于字符串长度抛出异常

Astute readers might wonder why charAt is more than seven times faster than the iterator, given that both provide O(1) access time.

聪明读者可能想知道既然大家提供0(1)访问时间为什么charAt迭代器7

However, by using charAt for each character, the first code block in Listing 3 pays the O(log n) lookup time n times.

但是由于每个字符使用charAt清单3第一个代码nOlogn查询时间