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.
This page is posted |
http://mindprod.com/jgloss/byte.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\byte.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[3.16.82.208] |
| |
Feedback |
You are visitor number | |