Hello,
I need explanation equality between integers in the last exercice. while the integer is less than 127, the equality works but beyond it's not. I have to cast integer into int. I believe the conversion is automatically done by the compiler.
if (i + 1 < list.size() && (int)list.get(i) == (int)list.get(i + 1)){
j++;
}
the code below doesn't work without the cast. why???
Thanks in advance.
GO TO FULL VERSION