When you add two bytes together you get an int. Why? To simplify the JVM, and reduce the number of bits needed for an op code, the JVM does not support 8-bit and 16-bit signed and unsigned operations. So bytes, chars, short are promoted to int before doing arithmetic on them.
| You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | |
| http://mindprod.com/jgloss/byte.html | J:\mindprod\jgloss\byte.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.191.100] | |
| Feedback | You are visitor number 21,801. | |