I know Java doesn\'t allow unsigned types, so I was wondering how it casts an integer to a byte. Say I have an integer a with a value of 255 and I cast the integer to a byte
or does it just directly copy the last 8 bits of the integer
yes, this is the way this casting works