Mega Code Archive

 
Categories / Java Tutorial / Development
 

Milliseconds since the epoch

import java.util.Date; public class MainClass {   public static void main(String[] args) {     Date now = new Date();     System.out.printf("milliseconds since the epoch: %TQ\n", now);   } } // milliseconds since the epoch: 1178825834349