When you add two bytes together you get an int. Why? To simplify the JVM (Java Virtual Machine), 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.
|
|
available on the web at: |
http://mindprod.com/jgloss/byte.html |
optional Replicator mirror
|
J:\mindprod\jgloss\byte.html | |
![]() |
Please email your
feedback for publication,
letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear
wording, broken/redirected link reports, suggestions to improve this page or comments to
Roedy Green :
| |
| Blog | Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[72.44.48.122] |
|
| Feedback | You are visitor number 26,096. | |