posted 17 years ago
Its simple.
Size of byte is 8 bits, So the range of values it can take
is -2x7 to + 2x7-1 which is (-128 to 127) . If you assign any value out of this range it will cycle through the above range [bit calculation]. Since you have assigned 128 which is excatly next number to 127 and so the value thats stored in byte variable is -128.
Hope this answers your question.
Thanks
Deepak