Java
Which java ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
Which java.util.Set realizations sorts the elements by their natural order (or on Comparator basis).?
java.util.TreeSet
java.util.HashSet
java.util.LinkedHashSet
Explanation
TreeSet sorts the elements (it implements SortedSet). LinkedHashSet allows you to control the order of the addition of elements, but does not sort them.
sets
hashcode
comparator
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
What will be printed after execution of this code? clas...
Java Collections
What will happen after the following code compilation and execution: ...
What is the result of the following code execution? Int...
Select all correct statements regarding the concept of relationship between hash...
J
ava
Quiz
Login to learn Java
or
Read more about
Java Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Java quizzes
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
int i = Integer.MAX_VALUE + 10; What is th...
What happens after the following code is compiled and run: ...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment