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

How do you use substring in java?

1123


Can we change the value of static variable?

949


Write a program to show whether a graph is a tree or not using adjacency matrix.

1087


In how many ways we can create threads in java?

1199


What does three dots mean in java?

1116


What is lambda in java?

1059


Does garbage collection occur in permanent generation space in jvm?

1075


Can I declare class as static or private?

952


Explain the importance of finally over return statement?

1035


What is the destroy method?

1037


Is java a pure object oriented language?

959


How to find the largest value from the given array.

1007


Why is whitespace important?

1074


Why java is platform independent? Explain.

997


Who is founder of java?

984