Integer i3=10;
Integer i4=10;
if(i3 == i4)
{
System.out.println("they are same);
}
else
{
System.out.println("not same");
output: they are same
this is code part from book scjp6 by k&b and in that it says "in order to save memory instances of wrapper objects are always == when their primitive values are same."
but when i am running code i am getting output "not same".....
please someone can explain it....