// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.Calendar;
import java.util.Date;

public class CalFun {
    public static void main(String[] args) throws Exception {
        Calendar calendar = Calendar.getInstance();
        calendar.set(2003,9,10,13,8,42);
        System.out.println(calendar.get(Calendar.MILLISECOND));
        Date date = calendar.getTime();
        System.out.println(date);
        Thread.sleep(100);
        calendar = Calendar.getInstance();
        calendar.set(2003,9,10,13,8,42);
        System.out.println(calendar.get(Calendar.MILLISECOND));
        date = calendar.getTime();
        System.out.println(date);
    }
}
