Long.getLong(String nm, Long val) has the following syntax.
public static Long getLong(String nm, Long val)
In the following code shows how to use Long.getLong(String nm, Long val) method.
/* ww w. j a v a 2 s. c o m*/ public class Main { public static void main(String[] args) { Long v = new Long(1234567890); System.setProperty("Java2s.com", "12345"); String str = "Java2s.com"; System.out.println(Long.getLong(str, v)); System.out.println(Long.getLong("java", v)); } }
The code above generates the following result.