Byte.valueOf

Byte.valueOf

Class Overview | Class Members | This Package | All Packages

Syntax 1
public static Byte valueOf( String s, int radix ) throws NumberFormatException
Parameters
s
the String containing the integer
radix
the radix to be used
Description
Assuming the specified String represents a byte, returns a new Byte object initialized to that value. Throws an exception if the String cannot be parsed as a byte.

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



Syntax 2
public static Byte valueOf( String s ) throws NumberFormatException
Parameters
s
the String containing the integer
Description
Assuming the specified String represents a byte, returns a new Byte object initialized to that 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.