Long Datatype in Java

long is 64 bit signed type and used when int is not large enough to hold the value.

Declare long varibale as below
long <variable name> = <default value>;

here assigning default value is optional.

import java.util.*;
public class Long {
        public static void main(String[] args) {
                long timeInMilliseconds = new Date().getTime();
                System.out.println("Time in milliseconds is : " + timeInMilliseconds);           

Output :
Time in milliseconds is : 1226836372234