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 different types of ways where you can iterate over a list? : java collections
Which java collection class can be used to maintain the entries in the order in which they were last accessed?
How do I find jre path in windows?
What are the different types of features of the java collections framework? : java collections
What is an algorithm in java collection framework? : java collections
who will give req's to u?. how they send req's to u? . what design documents contains?. when bugs raised on other developer code how to report to them?.(throgh mail or ........). how to retrive 100 recods from dao layer to presentation layer.using which collection?. what is sequence diagram.?.
What do you understand by synchronization? Why is it important?
what is mean by hasing and maping in java platform and advantage?
Hi we have an urgent requirement for Java/J2ee technical lead position & also looking for "Java Guidewire claimcentre" experienced professional for Bangalore location if interested can reach srisanh@gmail.com
What are the types of interface used in the java collections? : java collections
What are the main classes of the list interfaces? : java collections
What are the interfaces in java collections? : java collections
Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword
What is the enumerator of the java collection framework? : java collections
What is the difference between comparable and comparator in java.util pkg?