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