3 ms·
It can't overflow - max_int+max_int < max_uint
by poincaredisk 2y ago
It can't overflow - max_int+max_int < max_uint
- deleted 2y ago[deleted]
- tda 2y agoSo does the bitshift cast the result of the addition to an unsigned int? I am not so familiar with Java.
- beyondCritics 2y agoThis reasoning is correct but still has to assume that both indices are non negative, which is reasonable.