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

Is arraylist an object in java?

1140


Differentiate between the constructors and methods in java?

942


What is the difference between jvm and jre? What is an interface?

1092


How are observer and observable used in java programming?

1026


Can a class extend 2 classes in java?

1032


Can you override a final method?

1030


What is the use of private static?

1045


Explain about the security aspect of java?

967


How do you remove duplicates in java?

1013


What is the difference between superclass and subclass?

1169


Why doesn't the java library use a randomized version of quicksort?

993


What is a 16 bit word?

993


What is this keyword in java?

1031


Does the order of public and static declaration matter in main method?

1070


How hashmap works in java?

1041