4 ms·
Depends how left shift is implemented: on some processors (including x86), only the lowest order bits of the number of positions to shift by are used. In Java:
by Triave 15y ago
Depends how left shift is implemented: on some processors (including x86), only the lowest order bits of the number of positions to shift by are used. In Java:
char A = 1;
A = ((char) ((A << 32) & 0xFFFF));
System.out.println(Integer.toHexString(A));
actually outputs 1.