Why Set interface contains unique elements, what internally
implemented for this so that it contains unique elements?

Answer Posted / jayakumar

because it implement hashcode and equals method implicitly

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why declare Main() method as a static in java ?

805


What is return type in java?

821


what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread

694


What is the map interface in java programming?

768


What is a treemap in java?

745


What is the largest long allowed by java?

770


What is constant in programming?

759


What is the biggest integer?

799


What does index mean in java?

731


What is the difference between comparison done by equals method and == operator?

773


Which method cannot be overridden in java?

790


What are void methods?

786


What is ternary operator in java?

807


What are the restrictions imposed on method overriding?

770


Is array serializable java?

714