I would guess because bitwise operators only operate on ints and longs on the Jvm. In Java bytes and shorts are implicitly promoted to int before performing the operation. So you need to explicitly convert a byte/short into an int before doing this.
I would guess because bitwise operators only operate on ints and longs on the Jvm. In Java bytes and shorts are implicitly promoted to int before performing the operation. So you need to explicitly convert a byte/short into an int before doing this.