Java Byte.valueOf(String s)
Syntax
Byte.valueOf(String s) has the following syntax.
public static Byte valueOf(String s) throws NumberFormatException
Example
In the following code shows how to use Byte.valueOf(String s) method.
public class Main {
public static void main(String[] args) {
//w w w. j ava 2 s . c o m
System.out.println("parse string to byte:"+Byte.valueOf("10"));
}
}
The output: