Java Long(long value) Constructor

Syntax

Long(long value) constructor from Long has the following syntax.

public Long(long value)

Example

In the following code shows how to use Long.Long(long value) constructor.


public class Main {
  public static void main(String[] args) {
    Long long1 = new Long(12345L);
    // ww w .  j  a  va  2s.c  o  m
    System.out.println(long1);
  }
}

The output:





















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