Java tutorial
import java.util.Calendar; public class Main { public static void main(String[] args) throws InterruptedException { Calendar cal = Calendar.getInstance(); // print current time System.out.println(" Current time is : " + cal.getTime()); } }