Java Long.valueOf(long l)

Syntax

Long.valueOf(long l) has the following syntax.

public static Long valueOf(long l)

Example

In the following code shows how to use Long.valueOf(long l) method.


public class Main {
// w ww  . ja  va  2s .  c  o  m
   public static void main(String[] args) {

     System.out.println("Value = " + Long.valueOf(1234567890987654L));
   }
}

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