The compound assignment operator x += 1 is valid for byte type. The result of x += 1 is implicitly cast back to byte, so x will have the value 1. This is a special rule for compound assignment operators - they perform an implicit narrowing primitive conversion. No explicit cast is required, unlike simple assignment which would need (byte)1.