Short.parseShort

Short.parseShort

Class Overview | Class Members | This Package | All Packages

Syntax 1
public static short parseShort( String s ) throws NumberFormatException
Parameters
s
the String containing the short
Description
Assuming the specified String represents a short, returns that short's value. Throws an exception if the String cannot be parsed as a short. The radix is assumed to be 10.

Exceptions
NumberFormatException If the string does not contain a parsable short.



Syntax 2
public static short parseShort( String s, int radix ) throws NumberFormatException
Parameters
s
the String containing the short
radix
the radix to be used
Description
Assuming the specified String represents a short, returns that short's value. Throws an exception if the String cannot be parsed as a short.

Exceptions
NumberFormatException If the String does not contain a parsable short.