This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
To find out what the output of this is, you can ofcourse simply try it out.
A byte is an 8-bit signed integer. In the first line, you're setting the bits to 0xf1 (or 1111 0001 in binary).
In line 2 you're first shifting this to the right by 4 bits. When you shift a byte to the right, all the bits go right one place, the left rightmost bit will be discarded and the right leftmost bit will be copied from what was previously the right leftmost bit. So: