posted 17 years ago
Integer i = 127;
Integer j = 127;
if (i == j){
System.out.println("Same");
}
else{
System.out.println("different");
}
output = same.
Integer i = 128
Integer j = 128;
if (i == j){
System.out.println("Same");
}
else{
System.out.println("different");
}
output = different.
Please explain why ?
With Best Regards,<br />Pandharinath.<br />SCJP 5.0