Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

If set accepts only one argument then how can it compare
two objects to avoid duplicates

Answer Posted / r.jainrocks@gmail.com

Set compares hash code of new instance which
has to include in set with already containing values in Set.

because of this comparing b/w instances adding in set is slow
in Set and retrieval is fast.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you change array size in java?

917


What is the meaning of find and replace?

974


what are the states associated in the thread? : Java thread

998


What is the purpose of format function?

1078


How do you remove duplicates in java?

954


Why is java multithreaded?

932


What are the differences between processes and threads?

991


What is the use of runnable interface?

1085


Why put method is used?

962


How can you say java is object oriented?

1006


What is the basic concepts of OOPS?

1129


How does list work in java?

864


What do you mean by an object in java?

1077


What is a nonetype?

1047


Explain notify() method of object class ?

1033