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 stringwriter?

966


Difference between class#getinstance() and new operator ?

1223


What is wrapper class html?

948


What happens if we override private method?

982


Can you have two constructors in java?

1000


What is the purpose of a parameter?

1083


What are default methods ?

1056


How will you serialize a singleton class without violating singleton pattern?

1967


How to make object serializable in java?

998


What are register variables what are the advantages?

912


What are the differences between processes and threads?

1072


What is a bubble sort in java?

958


What are pass by reference and pass by value?

997


What are the restrictions that are applied to the java static methods?

999


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

1200