Java Long.getLong(String nm, Long val)

Syntax

Long.getLong(String nm, Long val) has the following syntax.

public static Long getLong(String nm,  Long val)

Example

In the following code shows how to use Long.getLong(String nm, Long val) method.


// w ww . j  a v a2s . com
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.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable