• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pls help me.

 
Bizwu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why answer is A? I think right answer is E(TreeSet)
because TreeSet is a class.
pls explain.thanks!

15. A ----- is a class that is a collection which cannot contain any
duplicate elements which maintains its elements in ascending order.
A.)SortedSet
B.)Set
C.)Sorted Map
D.)Collection
E.)TreeSet
Ans: A
[This message has been edited by Bizwu (edited December 03, 2001).]
 
Fei Ng
Ranch Hand
Posts: 1245
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agree.. if it is asking for a class then E) is the right answer.

15. A ----- is a class that is a collection which cannot contain any
duplicate elements which maintains its elements in ascending order.

Since TreeSet extends SortedSet which doesn't contain duplicate elements and mainatins an order. I think you are right.
 
david0379
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if treeSet extends sortedSet,then sortedSet is superclass of treeSet,and sortedSet is class! the ans should be correct!

Originally posted by Bizwu:
why answer is A? I think right answer is E(TreeSet)
because TreeSet is a class.
pls explain.thanks!

15. A ----- is a class that is a collection which cannot contain any
duplicate elements which maintains its elements in ascending order.
A.)SortedSet
B.)Set
C.)Sorted Map
D.)Collection
E.)TreeSet
Ans: A
[This message has been edited by Bizwu (edited December 03, 2001).]

 
david0379
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry,treeSet is interface not class,i think the right is e
Originally posted by Bizwu:
why answer is A? I think right answer is E(TreeSet)
because TreeSet is a class.
pls explain.thanks!

15. A ----- is a class that is a collection which cannot contain any
duplicate elements which maintains its elements in ascending order.
A.)SortedSet
B.)Set
C.)Sorted Map
D.)Collection
E.)TreeSet
Ans: A
[This message has been edited by Bizwu (edited December 03, 2001).]

 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bizwu and david0379,
your name does not comply with the Javaranch Naming Policy. Please read it and register again.
Thank you both for your cooperation
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic