Online Java Compiler By
JavaTpoint.com
public class JavaByteToUnsignedLongExample1 { public static void main(String[] args) { byte b1=-3; //converts the specified argument to an long by an unsigned conversion Long val=Byte.toUnsignedLong(b1); System.out.print("Unsigned long value for "+b1+" : "+val); System.out.println(val); } }
Output