cast to byte, but why?
Answered
Look at the picture:

Why does the Intellij complains to cast those two values to '(byte)', since they are so strictly encoded using '0b....' (it's Java) format?
IntelliJ IDEA 2021.3.3 (Community Edition)
Please sign in to leave a comment.
The java compiler itself would reject this code too.
The range of valid byte values is from -128 to +127. And `0b11111111` is 256 which is out of the byte range.
Also, see here for details: https://stackoverflow.com/q/38427664