Answers for "cast int to byte java"

3

int to byte

int i = 234;
byte b = (byte) i;
System.out.println(b); // -22
int i2 = b & 0xFF;
System.out.println(i2); // 234
Posted by: Guest on October-06-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language