Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Calendar;

public class Main {

    public static void main(String[] args) throws InterruptedException {

        Calendar cal = Calendar.getInstance();

        // print current time in milliseconds
        System.out.println("Current time is : " + cal.getTimeInMillis());

    }
}