Byte.parseByte

Byte.parseByte

Class Overview | Class Members | This Package | All Packages

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

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



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

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