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...

why the equals method can be override?when we override the
equals method?

Answer Posted / madhu

equals() method will be available in primodian class that is
Object class, but by default it compares only the addresses,
not the contents, So if you want the content comparison you
have to override equals(), but if u override the equals(),
you have to override the hashCode() also.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is methodological framework?

1051


What is the use of generics? When was it added to the Java development Kit?

1021


Why are parameters used in functions?

1020


what is method reference in java 8?

1044


What is role of void keyword in declaring functions?

1055


What is the synonym of procedure?

1125


'A class is a template for an object' explain this statement.

1060


What is array initialization in java?

1106


What are the differences between heap and stack memory in java?

1066


Explain about static nested classes in java?

1073


What is the functionality of the stub?

1042


What is a line break example?

1006


Can we overload destructor in java?

1001


Explain parallel processing in java8?

1259


what is the significance of listiterator in java?

1080