Check out example codes for "java get current milliseconds". It will help you in understanding the concepts better.

Code Example 1

package com.tutorialspoint;

import java.lang.*;

public class SystemDemo {

   public static void main(String[] args) {

      // returns the current time in milliseconds
      System.out.print("Current Time in milliseconds = ");
      System.out.println(System.currentTimeMillis());
   }
}

Learn ReactJs, React Native from akashmittal.com