If we try to add Enum constants to a TreeSet, what sorting order will it use?
A. Sorted in the order of declaration of Enums
B. Sorted in alphabetical order of Enums
C. Sorted based on order() method
D. Sorted in descending order of names of Enums
Answer: Option A
Related Questions on Data Types and Variables
Which of the following is not a valid identifier for a Java variable?
A. my_var
B. _myVar
C. 3rdVar
D. $var

Join The Discussion