== operator for object in Java


In past I don't understand why code in inner block doesn't run.

if (new Integer(1) == new Integer(1)) {
  doImportantJob();
};

Since "==" operator for object means if both objects point to the same memory location. The code above means two Integer(1) object is created, of course two sides must point to different memory location.