Byte valueOf(String s, int radix)
converts string to a Byte with the radix.
valueOf
has the following syntax.
public static Byte valueOf(String s, int radix) 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, int radix) method.
public class Main { public static void main(String[] args) { System.out.println("parse string to byte:"+Byte.valueOf("10", 8)); } }
The output: