Online Java Compiler By
JavaTpoint.com
public class JavaByteLongValueExample1 { public static void main(String[] args) { Byte b1=98; Byte b2=102; //returns the numeric value of this object after conversion to type long. Long val=b1.longValue(); System.out.println("1. Long value : "+val); System.out.println("2. Long value : "+b2.intValue()); } }
Output