In HashSet duplicates are allowed while adding to the HashSet,
but while retreiving the object from HashSet is not shown the
duplicate values, WHY ?
Answer Posted / shashi
Because HashSet class will override equals and hashcode method internally.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the types of interface used in the java collections? : java collections
What is the difference between comparable and comparator in java.util pkg?
What are the types of the main implementing classes in the map interfaces? : java collections
What are the main classes of the list interfaces? : java collections
What do you understand by synchronization? Why is it important?
How do I find jre path in windows?
What are the queues in the java collection framework? : java collections
What are the different types of features of the java collections framework? : java collections
What are the uses of the set interfaces in the java collections? : java collections
Hi Friends , am newbie to ajax. For example just consider one account registration - A form contains 8 text fields with submit button. In this form second texbox contains "username " . On right side of text box there is a label box . On clilck action i need to determine user is available or not. Is it possible on clicking label or should i click submit button.
HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS
Should we create system software ( e.g operating system ) in java ?
Which sorting algorithm is used by collections.sort() in java ?
Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?
What is java collection? : java collections