Can someone explain me the logic why a and b are both equal and x and y are not both equal but they have the same value.
Integer a = 40;`// integer a
Integer b =40; // integer b
Integer x = 400; // why x and y are not equal
Integer y = 400; // how is that possible
if (a==b){ //first condition
System.out.println("a=b"); //if true print
}else {
System.out.println("a!=b"); // if not true
}
if(x==y){ // second condition
System.out.println("x=y"); // if true print
}else{
System.out.println("x!y"); // if not true print
}