Multiple Choice
You have decided to store objects of a class in a TreeSet structure. Which of the following statements is correct?
A) If the object class implements the Comparable interface, and the sort order in the compare method is acceptable, you do not have to do anything else.
B) If the object class implements the Comparable interface, and the sort order in the compareTo method is acceptable, you do not have to do anything else.
C) If the object class implements the Comparable interface, and the sort order in the compare method is acceptable, you must create a comparator object.
D) If the object class implements the Comparable interface, and the sort order in the compareTo method is acceptable, you must create a comparator object.
Correct Answer:

Verified
Correct Answer:
Verified
Q35: What can a generic class be parameterized
Q36: Suppose we create a deque (double-ended queue)
Q37: Consider the following code snippet: Stack<String> words1
Q38: Select an appropriate expression to complete the
Q39: What type of access does a LinkedList
Q41: Which of the following statements about manipulating
Q42: Select an appropriate expression to complete the
Q43: Consider the following code snippet: Map<String, Integer>
Q44: Which of the following statements about linked
Q45: Which of the following statements about the