can any one explain wat exactly is being compared at lines 1,2,3,4
and hence why the result if we put System.out.println after each of these lines
public class WrapTest
{
public static void main(
String [] args)
{
int result=0;
short s =42;
Long x= new Long("42");
Long y=new Long(42);
Short z=new Short("42");
Short x2=new Short(s);
Integer y2=new Integer("42");
Integer z2 = new Integer(42);
//1 if(x==y) result=1;
//2 if(x.equals(y)) result = result +10;
//3 if(x.equals(z)) result = result +100;
//4 if(x.equals(x2)) result = result +1000;
System.out.println("result = " +result);
}
}