black

Java认证考试综合练习

登录

单项选择题

import java.util.*; 
class ScanStuff { 
public static void main(String [] args) { 
String s = "x,yy,123"; 
Scanner sc = new Scanner(s); 
while (sc.hasNext()) 
System.out.print(sc.next() + " "); 
} 
} 
结果是什么?() 

A.x yy
B.x,yy
C.x yy 123
D.x,yy,123

相关考题

单项选择题 BufferedWriter对象中的newLine()方法的含义是哪项?()

单项选择题 输出流输出数据后,应调用哪个方法将其关闭?()

单项选择题 1. import java.util.*;  2. class AddStuff {  3. public static void main(String [] args) {  4. TreeSet〈String〉 s = new TreeSet〈String〉();  5. s.add("one");  6. s.add("two");  7. // insert code here  8. for(String s2 : sorted)  9. System.out.print(s2 + " ");  10. }  11. }  和四个代码片段:  s1. SortedSet sorted = s.tailSet(s.first());  s2. SortedSet〈String〉 sorted = s.tailSet(s.first());  s3. SortedSet sorted = (SortedSet)s.tailSet(s.first());  s4. SortedSet sorted = (SortedSet〈String〉)s.tailSet(s.first());  分别插入到第7行,哪项可以编译?()

All Rights Reserved 版权所有©求知题库网库(csqiuzhi.com)

备案号:湘ICP备14005140号-1

经营许可证号:湘B2-20140064