Introduction
The decode()
method is a built-in Java method that is used to convert a string representation of a number into its long value. The numbers that can be decoded include decimal, hexadecimal, and octal numbers. If the string cannot be converted into a long, a NumberFormatException
is thrown.