Explain hashset and its features?
Answer / Anita Devi
A HashSet in Java is a set implementation that uses a hash table for faster lookups. Its main features include: 1) It does not allow null elements (neither keys nor values). 2) It maintains no particular order of elements. 3) It provides constant-time average performance for basic operations (O(1) for add, remove, and contains).
| Is This Answer Correct ? | 0 Yes | 0 No |
How can we avoid including a header more than once?
what is the significance of listiterator in java?
When will we use class loader?
Consider that class classA, abstract class classB, and final classC have been defined.Which one of the following is correct? 1. classA extends classC implements classB 2. class A extends classB, classC 3. classA extends classB 4. classB implements classC
What are three ways in which a thread can enter the waiting state in java programming?
What is difference between static class and singleton pattern?
What is method Overloading in the perspective of OOPS?
IS method overriding is Duplication of Methods?
how would you implement a thread pool? : Java thread
What is Generic in java? Where can we write Generic ( class or method or objects or etc...)? with simple example? Thanks, Bose.
2 Answers Infosys, Tech Mahindra,
How do you classify Dialog Box?
How dead lock situation occurs in java and how you can identify it?