black

SCJP程序员认证考试

登录

单项选择题

1. import java.util.*; 
2. public class Example { 
3. public static void main(String[] args) { 
4. // insert code here 
5. set.add(new integer(2)); 
6. set.add(new integer(l)); 
7. System.out.println(set); 
8. } 
9. } 
Which code, inserted at line 4, guarantees that this program will output [1,2]? ()

A. Set set = new TreeSet();
B. Set set = new HashSet();
C. Set set = new SortedSet();
D. List set = new SortedList();
E. Set set = new LinkedHashSet();

相关考题

多项选择题 10. interface Jumper { public void jump(); }  ......  20. class Animal {}  ......  30. class Dog extends Animal { 31. Tail tail; 32. }  ......  40. class Beagle extends Dog implements Jumper {  41. public void jump() { }  42. }  .......  50. class Cat implements Jumper {  51. public void jump() { }  52. }  Which three are true?()

多项选择题 Whichtwoaretrueabouthas-aandis-arelationships?()

多项选择题 Whichfouraretrue?()

All Rights Reserved 版权所有©考试题库网(kstiku.com)

备案号:湘ICP备14005140号-3

经营许可证号:湘B2-20140064