Java Calendar getTimeInMillis 检查线程的Java示例 Java示例-显示所有正在运行的线程Thread Java Calendar getTimeInMillis package com.codingdict; import java.util.*; public class CalendarDemo { public static void main(String[] args) throws InterruptedException { // create a calendar Calendar cal = Calendar.getInstance(); // print current time in milliseconds System.out.println("Current time is : " + cal.getTimeInMillis()); // add a delay of 2 seconds Thread.sleep(2000); // create a new calendar Calendar cal2 = Calendar.getInstance(); // print the next time in milliseconds long d = cal2.getTimeInMillis(); System.out.println("Next time is : " + d); } } 检查线程的Java示例 Java示例-显示所有正在运行的线程Thread