byte i=-1;
From comments:
Unsigned right-shifting, in Java, causes unary promotion to
int
: the
byte0xff
becomes theint
0xffffffff
, which is then right-shifted to
0x7fffffff
and narrowed to0xff
for storage.
3
solved Import some code so that loop become infinite? [closed]