So this is probably common in programming world, you write a program, it works but you don't really know how it works :D I need an explanation to one particular part of the program. Why does comparison
list.get(i).equals(list.get(i+1))
return true for integers higher then 127 if values are the same but
list.get(i) == list.get(i+1)
returns false? After all we are comparing integers, not objects so "==" operator should be fine there. "==" operator works as intended for numbers lower then 127. What does the 127 number do, does it magically turn integer simple type into complex type? I don't get it, please explain.