Package java.lang
Class Byte

Public Method parseByte

static byte parseByte(String s)

Throws:

static byte parseByte(String s, int radix)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

parseByte(String s) method:

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.

parseByte(String s, int radix) method:

Assuming the specified String represents a byte, returns that byte's value. Throws an exception if the String cannot be parsed as a byte.

Example

   Logger.log("String to byte value: " + Byte.parseByte("23", 10));
   Logger.log("Hexadecimal to byte value: " + Byte.parseByte("23", 16));
   Logger.log("Octal to byte value: " + Byte.parseByte("23", 8));

The example above writes different byte values to the logger.