FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 49   



Below program shows you how to print current time in milliseconds.
We can get current milliseconds using System.currentTimeMillis() in java.

import java.time.LocalTime;
import java.util.Scanner;

public class Basic12 {

    public static void main(String[] args) {

        long currentTimeInMilliSeconds = System.currentTimeMillis();

        System.out.println("Current time in milliseconds: " + currentTimeInMilliSeconds);

    }
}

Output:

Current time in milliseconds: 1521735714734



On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News