网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
判断题
String nextToken( )用来逐个获取字符串中的单词并返回该字符串
A
对
B
错
参考答案
参考解析
解析:
暂无解析
更多 “判断题String nextToken( )用来逐个获取字符串中的单词并返回该字符串A 对B 错” 相关考题
考题
分析两个字符串,分别输出每个字符串的单词并统计出单词个数。阅读程序,填写空行。注意:不改动程序结构,不得增行或删行。import java.util.*;public class ex2{public static void main(String args[]){String s1="I am Chinese,she is my girlfriend";String s2="Oh,really,fine";StringTokenizer fenxi_1=new StringTokenizer(s1,",");StringTokenizer fenxi_2=new StringTokenizer(s2,",");int n1=fenxi_1.countTokens();int n2=fenxi_2.countTokens();while(fenxi_1.hasMoreTokens()){String s=fenxi_1.nextToken();System.out.println(s);}System.out.println("s1单词:"+n1+"个");while(fenxi_1.hasMoreTokens()){String s=______;System.out.println(s);}System.out.println("s2单词:"+n2+"个");}}
考题
UiSelector的description()查找属性content-description为指定字符串的UI元素并返回UiSelector,要求字符串必须完全匹配。()
此题为判断题(对,错)。
考题
下列关于算术函数的说法中,正确的是( )。A.Rnd[(number)]用来获得大于等于0,但小于1的双精度随机数B.Trim(string)只能用来删除string字符串末尾空格C.Str(number)用来将number转换为字符串,非负数以+开头,负数以-开头D.Chr(charcode)用来返回charcode所对应的字符,其中charcode为ASCII码
考题
使用String对象的indexOf()方法查找字符串”helloworld”中是否包含G,下列语句描述正确的是()。A、字符串"helloworld"中不包含G字符,indexOf返回0B、字符串"helloworld"中不包含G字符,indexOf返回nullC、字符串"helloworld"中不包含G字符,indexOf返回-1D、字符串"helloworld"中不包含G字符,indexOf返回1
考题
Visual Basic.NET中,字符串处理函数中返回Str字符串的长度的是()。A、Mid(Str,Start,Lengh)B、Len(Str)C、Instr(Star,String1,String2,Compare)D、Ltrim(Str)
考题
下列关于字符串的描叙中错误的是()。A、字符串是对象B、String对象存储字符串的效率比StringBuffer高C、可以使用StringBuffer sb="这里是字符串"声明并初始化StringBuffer对象sbD、String类提供了许多用来操作字符串的方法:连接,提取,查询等
考题
下面哪个方法能判断字符串中是否存在和指定正则表达式匹配的字符串;是则返回true,否则返回false:()A、RegExp 对象的 test()方法B、RegExp 对象的 exec()方法C、String 对象的 search()方法D、String 对象的 match()方法
考题
判断题String类的方法 replace (CharSequence srt1, CharSequence srt2)返回一个新的字符串,它是通过用srt2替换此字符串中出现的所有 srt1得到的A
对B
错
考题
单选题Visual Basic.NET中,字符串处理函数中返回Str字符串的长度的是()。A
Mid(Str,Start,Lengh)B
Len(Str)C
Instr(Star,String1,String2,Compare)D
Ltrim(Str)
考题
单选题使用String对象的indexOf()方法查找字符串”helloworld”中是否包含G,下列语句描述正确的是()。A
字符串helloworld中不包含G字符,indexOf返回0B
字符串helloworld中不包含G字符,indexOf返回nullC
字符串helloworld中不包含G字符,indexOf返回-1D
字符串helloworld中不包含G字符,indexOf返回1
考题
(难度:中等)java String对象可以通过调用length()方法获取该字符串的长度
热门标签
最新试卷