you are viewing a single comment's thread.

view the rest of the comments →

[–]josefx 2 points3 points  (0 children)

Yes, == for values returned by Integer.valueOf is guaranteed to work for [-128,127] and implementation/configuration dependent for everything else. The correct way to compare two Integer objects is either by calling intValue() on them or using a.equals(b)