Online Java Compiler By
JavaTpoint.com
public class JavaByteValueOfExample3 { public static void main(String[] args) { // returns a byte object holding the specified String value String str="null"; //return an exception if the string does not contain a parsable byte System.out.println("valueOf() method returns : "+Byte.valueOf(str)); } }
Output