Please, explain to me, why do I get longToInt value == -9 when converting long into int? I understand that my long is higher than max value of int and I expected to get some warning by IDE or some error by compiler, not -9. Thx!
long someLong = 21474836471L;
int longToInt = (int) someLong;
System.out.println(longToInt);