Package java.lang
Class Short

Public Method parseShort

static short parseShort(String s)

Throws:

static short parseShort(String s, int radix)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

parseByte(String s) method:

Assuming the specified String represents a shrot, returns that short's value. Throws an exception if the String cannot be parsed as a short. The radix is assumed to be 10.

parseByte(String s, int radix) method:

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

Example

   Logger.log("String to short value: " + Short.parseShort("23", 10));
   Logger.log("Hexadecimal to short value: " + Short.parseShort("23", 16));
   Logger.log("Octal to short value: " + Short.parseShort("23", 8));

The example above writes different short values to the logger.