Can anyone explain this one for me:
public class SameObject {
public static void main(
String args[]){
Integer i1=128;
Integer i2=128;
System.out.println(i1==i2);
}
}
The output will be false
Whereas
public class SameObject {
public static void main(String args[]){
Integer i1=18;
Integer i2=18;
System.out.println(i1==i2);
}
}
results in the output true
Why is this difference.