Tech Me More

To quench our thirst of sharing knowledge about our day to day experience & solution to techincal problems we face in our projects.

Advertise with us !
Send us an email at diehardtechy@gmail.com

Wednesday, July 30, 2014

OCJP Practice question #26 [Equals method]

What will be the output of the following Java program ?




Answer : option C


Explanation:

Option C is true as class A doesn't override the equals method, so it will be called from Object class, and in Object class equals method 



  • For any non-null reference value x, x.equals(null)should return false.




No comments: