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

What is difference between “==” and equals()?

Answer Posted / javamasque

“==”: It compares references (memory locations). It does not compares values in the memory location. Hence it is not recommended to find the equality of two objects. It is mostly used to compare primitive types.

equals(): It is used to find the equality of two objects. It actually compares with the values that an object contains.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we convert integer to string in java?

1057


Can you explain the final method modifier?

1018


Why java is used everywhere?

1014


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

990


How to create a base64 decoder in java8?

1065


How do you implement singleton class?

995


What is externalizable?

1070


What is are packages?

1036


Difference difference paint() and paintcomponent()?

1004


What is integer parseint?

997


Explain the difference between runnable and callable interface in java?

1056


Is string is a keyword in java?

980


What is string syntax?

1059


Explain about anonymous inner classes in java?

1090


Implement 2 stacks with just 1 array. The stack routines must not indicate overflow unless every slot in array is used.

1330