Regarding my previous Question, Why do == comparisons with Integer.valueOf(String) give different results for 127 and 128? , we know that Integer class
Integer
class
When you encounter with Integer class and always boxed within the range -128 to 127 it's always better to convert the Integer object into int value as below.
.intValue()