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

whats the difference between == and .equal ?

Answer Posted / deepak sharma

== compares the object refrences to see if they refer to the
same object in memory.

where as

.equals compares the content of object to see if the object
content is same. Most of the times it is used to compare the
String Object. It can be used to compare other Objects too.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a constructor have different name than a class name in java?

1086


What is super keyword explain with example?

1205


What is the scope or life time of instance variables?

1058


Explain java coding standards for classes or java coding conventions for classes?

1061


What is a map? What are the implementations of map?

1040


Why lambda expression is used in java?

997


what are the disadvantages of indexes in oracle?

2444


What is the purpose of methodology?

1028


Can java hashmap have duplicate keys?

960


Can you give few examples of final classes defined in java api?

957


What is the default value of an object reference declared as an instance variable?

1042


Differece between class and generic class?

980


Is a copy constructor?

1000


What data type is string java?

914


What is parseint?

953