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

Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.

2000


Can singleton class be inherited in java?

995


What are static initalizers in java ?

1010


What is mnemonic code?

1011


Explain the differences between abstraction and encapsulation?

1051


How would you format a date in java? I.e. In the ddmmyyy format?

1373


What is a stringbuffer?

961


What do you mean by stack?

1149


Is space a char?

922


Is vector ordered in java?

994


what is meant by encapsulation?

1081


Differentiate between postfix and prefix operators in java.

1123


What is meant by object?

1002


How arrays are stored in memory in java?

973


Explain about fail safe iterators in java?

1020