Online Java Compiler By
JavaTpoint.com
public class JavaByteToUnsignedIntExample2 { public static void main(String[] args) { byte b1=Byte.MAX_VALUE; int val=Byte.toUnsignedInt(b1); System.out.print("Unsigned Int value for "+b1+" : "+val); System.out.println(val); } }
Output