The correct answers have already been given. But just to add my two cents:
Integer b1 = 1000, b2 = 1000;
This is awful code. Objects should be initialized as Objects through constructors or factory methods. E.g.
// let java decide if a new object must be created or one is taken from the pool
Integer b1 = Integer.valueOf(1000);
or
// always use a new object
Integer b2 = new Integer(1000);
This code
Integer b1 = 1000, b2 = 1000;
on the other hand implies that Integer was a primitive, which it is not. Actually what you are seeing is a shortcut for
Integer b1 = Integer.valueOf(1000), b2 = Integer.valueOf(1000);
and Integer only pools objects from -127 to 127, so it will create two new Objects in this case. So although 1000 = 1000, b1 != b2. This is the main reason why I hate auto-boxing.