Please tell me why the data type of byte gives a valid arithmetic result whereas int does not. I understand what happened to the int due to overflow value but I don't understand why byte behaved differently.
Most operators produce int results (unless there is a long as one of the operands, in which case the operation produces a long results). So the type of b*2 isn't a byte, even though b is a byte, the type of the operation is int and int has no trouble holding 256 values.
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.