Wednesday, July 30, 2014

OCJP Practice question #26 [Equals method]

4:03 PM

What will be the output of the following Java program ?

Answer : option C


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.


Post a Comment


© 2014 DieHardTechy . All rights resevered. Designed by Diehardtechy