int val = 233; byte b = (byte) val; System.out.println(b); I have a simple case: I have one integer with some value & I want to convert that value into a byte for output. But in this case, a negative value is coming.
How can I successfully place the int value to byte type?