Junior — Senior
What will the program output when comparing Integer objects with the == operator
livecode
Task condition
Determine what result will be printed to the console when the following code is run:
public class Test2 {
public static void main(String[] args) {
Integer a = 100;
Integer b = 100;
Integer c = 200;
Integer d = 200;
System.out.println("a == b: " + (a == b));
System.out.println("c == d: " + (c == d));
}
}