Byte valueOf(String s)
converts String to a Byte.
valueOf
has the following syntax.
public static Byte valueOf(String s) throws NumberFormatException
valueOf
has the following parameters.
valueOf
returns
a Byte object from the string argument
In the following code shows how to use Byte.valueOf(String s) method.
public class Main { public static void main(String[] args) { System.out.println("parse string to byte:"+Byte.valueOf("10")); } }
The output: