educative.io

Quiz Yourself on POP and OOP Concepts - A Complete Guide to Java Programming

In question 6, the byte ranges from -127 to 127, then how come 128 is the output ? it should be a compilation error. Also, the int and int doing sum and storing to byte can loose some information.

The output is not the range it’s just the simple sum answer and the data will not loose as it is in the range