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 / ashutosh

for comparison between two objects of the same class, class
must override equals() and hashcode() methods of the object
class.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to declare an arraylist in java?

998


How do you read and print a string in java?

907


Can we declare a constructor as final?

1206


What is the purpose of the system class in java programming?

1005


Why we go for collections in java?

919


What is entry in java?

968


Difference between stack and queue?

1014


How can we make a class singleton?

1002


How does java pattern compile work?

909


What does s mean in regex?

954


What is collection class in java? List down its methods and interfaces.

897


Explain different ways of creating a thread?

985


Which java version is latest?

962


What are the three best choices for a development environment?

1049


What is the method to expand and collapse nodes in a jtree?

982