Hi all... I am bit confused on equals method I thought it takes only variables with object references...
Integer L = new Integer(5);
Integer K = new Integer(5);
if ( L.equals(K)){ // This works fine since both are objects....
String H = "Hello";
if (H.equals("Hello"){ //This works fine too...??
Shouldnt the second if statement fail since it is not using any objects in equals method input param. I am confused.