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
Optional Replicator mirror
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.
Your face IP:[126.96.36.199]
You are visitor number|