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 / jai

== this is equal to it mainly compares only the values of
the object if both are equal it returns true or else false


eg. a=10,b=20
if (a==b)
it will return false



for the same case it will return false for .equals since
.equals will check only that the objects refr to the same
reference (address) of the instance


clear

Is This Answer Correct ?    1 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is reflexive association?

1873


What are advantages and disadvantages of OOPs?

1194


extending thread class or implementing runnable interface. Which is better? : Java thread

1044


Is arraylist ordered in java?

1170


Can we declare the static variables and methods in an abstract class?

1030


Is arraylist dynamic in java?

1058


Can a class have a static inner class?

1117


How to make a non daemon thread as daemon?

1113


What is final keyword in java?

1069


What is the declaration statement?

996


What is the difference between abstract classes and interfaces?

1082


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

1058


What is externalizable?

1116


Why does java does not support multiple inheritance? Explain

1038


What is considered an anti pattern?

980