Java Short.valueOf(String s)
Syntax
Short.valueOf(String s) has the following syntax.
public static Short valueOf(String s) throws NumberFormatException
Example
In the following code shows how to use Short.valueOf(String s) method.
public class Main {
public static void main(String[] args) {
System.out.println(Short.valueOf("10"));
// ww w .j a va2 s.c om
}
}
The output: