This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sun Sample question #8

 
Mukti Bajaj
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
SAMPLE QUESTION 8:
Which two statements are true for the class java.util.TreeSet? (Choose two.)
A.The elements in the collection are ordered.
B.The collection is guaranteed to be immutable.
C.The elements in the collection are guaranteed to be unique.
D.The elements in the collection are accessed using a unique key.
E.The elements in the collection are guaranteed to be synchronized
Answer: A,C
Mukti
 
shabbir zakir
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SAMPLE QUESTION 8:
Which two statements are true for the class java.util.TreeSet? (Choose two.)
A. The elements in the collection are ordered.
B. The collection is guaranteed to be immutable.
C. The elements in the collection are guaranteed to be unique.
D. The elements in the collection are accessed using a unique key.
E. The elements in the collection are guaranteed to be synchronized
Answer: A,C
Mukti
HI!
According to me the correct answer is only A.
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3713
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TreeSet implements SortedSet (which extends from Set). Now you should know why C is correct.
HTH,
Paul.
------------------
Get Certified, Guaranteed!
(Now Revised for the new Pattern)
www.enthuware.com/jqplus
 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anytime something that has Tree in its class name, you can feel comfortable that they will be sorted. Tree's are in ascending order, like a tree.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic