Description:
This method decodes a String into a Short. It accepts decimal, hexadecimal, and octal number in the following formats:
The constant following an (optional) negative sign and/or "radix specifier" is parsed as by the Short.parseShort method with the specified radix (10, 8 or 16). This constant must be positive or a NumberFormatException will result. The result is made negative if first character of the specified String is the negative sign. No whitespace characters are permitted in the String.
Example
Short data = Short.decode("20");
The example above decodes a string to a Short number.