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