从一个字符串中取出指定位置的字符,采用String类中的()方法。
A: charAt()
B: endsWith()
C: A、charAt()B、endsWith()C、indexOf()D、substring()
D: indexOf()
A: charAt()
B: endsWith()
C: A、charAt()B、endsWith()C、indexOf()D、substring()
D: indexOf()
A
举一反三
- 从一个字符串中取出指定位置的字符,采用String类中的()方法。 A: charAt() B: endsWith() C: indexOf() D: substring()
- 字符串类String中取出指定位置字符的方法是( )。 A: charAt( ) B: getBytes() C: substring() D: valueOf()
- String类中返回指定位置处的字符,应使用( )。 A: charAt B: startsWith C: endsWith D: contains
- 在字符串中返回指定位置的字符,可以使用()方法。 A: charAt B: indexOf C: match D: search
- 以下哪个方法用来从字符串中获取一个字符。 ( ) A: indexOf(String str) B: substring(int beginIndex, int endIndex) C: concat(String str) D: charAt(int index)
内容
- 0
String类中,用于返回指定字符串起始位置的方法是( )。 A: charAt B: indexOf C: lastIndexOf D: positionOf
- 1
下列方法中,( )用于实现获取字符在某个字符串中第一次出现的索引。 A: char charAt(int index) B: int lastIndexOf(int ch) C: boolean endsWith(String suffix) D: int indexOf(int ch)
- 2
以下String对象的()方法得到指定位置处的字符? A: indexOf() B: charAt() C: charIsAt() D: indexOfThePosition()
- 3
字符串类String中取出指定位置字符的方法是( )。[br][/br]B. C. D.[br][/br]A. A: charAt( ) B: getBytes() C: substring() D: valueOf()
- 4
获取一个字符在字符串中首次出现的位置,使用()方法。 A: charAt() B: indexOf() C: lastIndexOf() D: substr()