A Timing Utility : System « Utility Classes « SCJP






System.currentTimeMillis returns a long primitive that represents the number of milliseconds 
since 00:00:00 GMT January 1, 1970. 


public class MainClass{
    public static void main(String[] argv){
       System.out.println(System.currentTimeMillis());
    }
}








8.29.System
8.29.1.The System and Runtime Classes
8.29.2.A Timing Utility
8.29.3.The System class provides the exit method to stop the Java Virtual Machine (JVM).