A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Programmer Certification (SCJP/OCPJP)
Integer to Byte
Joined: Apr 23, 2007
Dec 30, 2008 00:36:00
how the convertion from integer to byte happens?
y value is -26.how the result will be -26
anyone please help me.....
Joined: Aug 03, 2008
Dec 30, 2008 00:49:00
Well Banu the value 230 is out of the range of byte which is from -128 to 127. So the value 230 will be truncated. This truncation happens at the binary level. Just read a tutorial about Number Systems to understand this concept...
SCJP 6 | SCWCD 5 |
Javaranch SCJP FAQ
subject: Integer to Byte
casting shifted values
characters in a byte
Question about Autoboxing/Unboxing.
Convert byte to its hex format?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015