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

What are different types of classloaders?

1015


What is string args [] in java?

1031


What type of variable is gender?

986


Is object a data type in java?

1105


How do you do a line break in java?

1006


What is not object oriented programming?

931


Is main is a keyword?

996


How does queue work in java?

984


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

988


What do you mean by stack?

1148


How can you share data between two thread in Java?

934


What is difference between this and super keyword?

983


What happens if an exception is throws from an object's constructor?

1123


What is static keyword in java?

999


Can we pass a primitive type by reference in java? How

906