多项选择题
哪两个是同步的?()
A. java.util.TreeSet
B. java.util.Hashtable
C. java.util.Vector
D. java.util.LinkedList
点击查看答案&解析
相关考题
-
单项选择题
现有: import java.util.*; class AddStuff2 { public static void main(String [] args) { TreeSett=new TreeSet(); if (t.add("one")) if (t.add("two")) if (t.add ("three")) add("four"); for (String s : t) System.out.print (s); } } 结果为:()
A. one
B. one three two
C. one two three
D. one two three four
E. four one three two
F.编译失败 -
单项选择题
现有: 3. import java.util.*; 4. class ForInTest { 5.static List list=new ArrayList(); 6. 7.public static void main (String [] args) { 8.list. add("a"); list. add("b");list. add( "c"); 9. //insert code here 10. System.out.print (o); 11. } 12. } 哪一行插入到第9行将导致输出“abc"?()
A. for (Iterator o : list.iterator(); o.hasNext (); )
B. for (Iterator 0 : list)
C. for (Object o : list.iterator())
D. for (Object o : list) -
单项选择题
现有 public class Demo{ public static void main (String[] args){ List al=new ArrayList(); a1.add("l"); a1.add("2"); a1.add("2"); a1.add("3"); System.out.println (al); } } 上述程序执行后的输出是哪项?()
A. [1,2,3]
B. [1,2,3,3]
C. [1,2,2,3]
D. [2,1,3,2]
