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()?



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

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

More Core Java Interview Questions

1) Find the Merge point of two linked lists. 2) Swap two bits of integer. 3) Reverse individual words of the sentence. 4) Reverse string without using temp string.

2 Answers   HCL,


Why are the objects immutable in java?

0 Answers  


Difference between concurrent hashmap and hashtable and collections

0 Answers  


What is bytecode verifier?

0 Answers  


Why are the methods of the Math class are static?

1 Answers  


Is singleton a bad practice?

0 Answers  


Is there a jre for java 11?

0 Answers  


What are the 6 functions?

0 Answers  


write a code, we have two thread, one is printing even no and other print the odd no.

1 Answers   Global Logic,


Which is easier .net or java?

0 Answers  


Why can we not override static method?

0 Answers  


Define iterator and methods in iterator?

0 Answers  


Categories