java.lang.String-firstMethod-charAt()
来源:互联网 发布:剑灵灵剑士捏脸数据 编辑:程序博客网 时间:2024/05/20 11:27
english prototype---
charAt
public char charAt(int index)
- Returns the
char
value at the specified index. An index ranges from0
tolength() - 1
. The firstchar
value of the sequence is at index0
, the next at index1
, and so on, as for array indexing.If the
char
value specified by the index is a surrogate, the surrogate value is returned. - Specified by:
charAt
in interfaceCharSequence
- Parameters:
index
- the index of thechar
value.- Returns:
- the
char
value at the specified index of this string. The firstchar
value is at index0
. - Throws:
IndexOutOfBoundsException
- if theindex
argument is negative or not less than the length of this string.
中文--
public char charAt(int index)charAt() //一般我们看API的时候我们要关注这个方法名,返回类型,以及参数等几个方面,
返回特定索引上的一个char值,索引的范围是:0-字符串长度减一,第一个char的下标索引值是0,下一个是1,和数组时相类似的,如果char的值被特殊的索引替代,则这个替代的值就会被返回去。
charAt存在于接口CharSequence中,
参数:
索引-就是指的那个char的值
抛个异常:
跑出一个IndexOutOfBoundsException(数组下标越界),如果索引是一个负数或者小于这个字符串的长度,就会抛出这个异常。
- java.lang.String-firstMethod-charAt()
- java.lang.String.charAt() 方法
- 【leetcode】java String.charAt()
- Java String charAt()方法
- String.charAt()
- java--charAt()
- String charAt()、charCodeAt()、fromCharCode()方法
- android String.charAt的使用
- Java charAt() 方法
- Java.lang.String & [Ljava.lang.String
- java.lang.String
- java.lang.string
- java.lang.String
- java.lang.String 学习
- java.lang.String
- java.lang.string.split
- java.lang.String
- java.lang.string
- 右键选中TreeCtrl中的项
- jQuery formValidator
- python zip文件 压缩
- 修改sqlserver 2008 express为混合认证模式
- 为什么C++成员函数不能作为C-Style回调函数?
- java.lang.String-firstMethod-charAt()
- python zip文件 压缩1
- 我发了贴也回了贴,为什么积分不涨啊
- 跨服务器跨数据库访问,暂存,待整理
- 一个IT程序员的反思!
- HOOK专题
- 如果客户端提交的FQDN本服务器没有,那么禁止服务器会帮助客户端去查询
- python zip文件压缩_python
- 不同字符集数据库之间转码办法 以WE8ISO8859P1转到ZHS16GBK为例