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

Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.

970


What is reverse function?

1052


What are synchronized methods and synchronized statements in java programming?

966


Which is bigger float or double java?

924


How do you override a method?

956


What are advantages of exception handling in java?

974


Explain all java features with real time examples

1656


Can we serialize static variables in java?

1035


What data type is string java?

906


What is temp in java?

941


What is the difference between java applets and applications?

1094


What does @override mean?

1100


What is a conditional statement explain with example?

958


What are parsing rules?

934


Are arrays primitive data types?

1098