Online Java Compiler By
JavaTpoint.com
public class JavaByteValueOfExample2 { public static void main(String[] args) { // returns a byte object holding the specified String value String str="56"; System.out.println("valueOf() method returns : "+Byte.valueOf(str)); } }
Output