fork download
  1. class Ideone
  2. {
  3. public static void main (String[] args) throws java.lang.Exception
  4. {
  5. Integer x = 524;
  6. Integer y = x + 1;
  7. Integer z = y - 1;
  8. System.out.println("equals? " + x.equals(z));
  9. System.out.println("==? " + (x == z));
  10. }
  11. }
Success #stdin #stdout 0.12s 320576KB
stdin
Standard input is empty
stdout
equals? true
==? false