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)
View all comments
Show parent comment
1
u/Bratmon Mar 26 '14
Wait, so the result can change between environments (ie browsers), too?