Online Java Compiler By
JavaTpoint.com
public class JavaByteByteValueExample3 { public static void main(String[] args) { byte b1 = 23; //b1 is a primitive object it can't be used to call Byte class methods Byte b2 = b1.byteValue(); System.out.println(b2); } }
Output