Java Long.decode(String nm)
Syntax
Long.decode(String nm) has the following syntax.
public static Long decode(String nm) throws NumberFormatException
Example
In the following code shows how to use Long.decode(String nm) method.
The following code decodes a long value in hexadecimal format.
public class Main {
public static void main(String[] args) {
Long longObject = Long.decode("0Xff");
System.out.println(longObject);//ww w . j ava 2 s. co m
}
}
The output: