This week's book giveaways are in the Java EE and JavaScript forums. We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line! See this thread and this one for details.

"Since the integer's value (256) is larger than the byte's range (-128 to +127), the result is the remainder of the division of the integer value by the byte's range (256) which is zero"

I have not been able to understand the explanation of this answer.

I was thinking the solution in this way.....

00000000 00000000 00000001 00000000 (256 in Decimal)

when we cast it to byte then we are left with only the first 8 bits.

00000000

so after casting and after removing the other 24 bits, it will be 0.

I hope my method of doing it is right.

But I have not been able to understand the explanation of WHIZLABS mock.

Please someone explain that way of finding the value.