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

Explain public static void main(string args[]).

1232


What is a superclass?

1402


What is meant by object oriented programming – oop?

1045


Is vector synchronized in java?

1049


What is methods in java?

1045


What is native method in java?

1117


What are "methods" and "fields"?

1063


What is an example of a constant variable?

1143


How do I start learning java?

1125


Describe the syntax of multiple inheritance? When do we use such an inheritance?

1136


What is meant by class and object in java?

1101


Can we declare an interface as final?

1110


When will we prefer to use set and list in java and why?

1016


What is the abstraction?

1057


What is parsing in java?

1009