System.currentTimeMillis() has the following syntax.
public static long currentTimeMillis()
In the following code shows how to use System.currentTimeMillis() method.
public class Main { public static void main(String[] args) { System.out.print("Current Time in milliseconds = "); System.out.println(System.currentTimeMillis()); } }
The code above generates the following result.