Java tutorial
public class Main { public static void main(String[] args) { byte b = -10; int x = Byte.toUnsignedInt(b); System.out.println("Signed value in byte = " + b); System.out.println("Unsigned value in byte = " + x); } }