Long.valueOf(String s) has the following syntax.
public static Long valueOf(String s) throws NumberFormatException
In the following code shows how to use Long.valueOf(String s) method.
public class Main { public static void main(String[] args) { String str = "1234567890987654"; System.out.println("Value = " + Long.valueOf(str)); } }
The code above generates the following result.