charat
美
英 
- 網(wǎng)絡(luò)截取一個(gè)字符;方法也會(huì)產(chǎn)生一個(gè);指定位置字符
例句
Although the charAt implementation directly returns char primitives, the iterator implementation must box each char into a Character object.
而charAt實(shí)現(xiàn)直接返回char原語(yǔ),迭代器實(shí)現(xiàn)必須將每個(gè)char裝箱為一個(gè)Character對(duì)象。
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只提供了一個(gè)方法來訪問它的字符:charAt(x)。
For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.
對(duì)于charAt這樣的方法,索引值等于字符串的長(zhǎng)度時(shí)也會(huì)拋出該異常。
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)的訪問時(shí)間,為什么charAt會(huì)比迭代器快7倍。
However, by using charAt for each character, the first code block in Listing 3 pays the O(log n) lookup time n times.
但是,由于每個(gè)字符上都使用charAt,清單3中第一個(gè)代碼塊花了n倍的O(logn)查詢時(shí)間。