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

Why do we use regex?

1079


What is parsing a sentence?

1169


What is final method?

1118


What are different exception types exceptions available in java ?

1050


What Is Query Throttling in java?

1045


What is super?

1250


Why heap memory is called heap?

1093


What is the current version of java?

1091


Can a method be overloaded based on different return type but same argument type?

1015


What is data structure in java?

1039


What state is a thread in when it is executing?

1030


What is locale?

1083


What is a memory leak in java?

1130


How would you use Bubble Sort to sort the number of elements?

1058


Why is it called a string?

1050