how to converet negative byte value to postive int value in java

123

how to converet negative byte value to postive int value in java -

int value = (byteValue >= (byte) 0) ? (int) byteValue : 256 + (int) byteValue; 

Comments

Submit
0 Comments