Autoboxing

What will be the output of the following Java code -

1
2
3
4
Integer a = 100, b = 100;
System.out.println(a == b);
Integer c = 200, d = 200;
System.out.println(c == d);

Details and Assumptions

  • Ignore the line break in the print statement.
  • Code is only tested for Java 5+.
×

Problem Loading...

Note Loading...

Set Loading...