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 a class extends itself in java?

980


What is jit compiler in java?

1040


Why use string handling in Java?

997


How do you join strings in java?

995


What is meant by flickering?

1036


Who developed java?

944


What is the difference between dom and sax parser in java?

935


How many types of interfaces are there?

993


Why is multiple inheritance not supported in java?

974


In case of inheritance what is the execution order of constructor and destructor?

1065


Why is logger singleton?

1028


How do generics work?

900


List implementations of list interface?

996


Explain wait() method of object class ?

1146


Why does java have two ways to create child threads?

912