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