Today.java Source code

Java tutorial

Introduction

Here is the source code for Today.java

Source

import java.util.Calendar;
import static java.util.Calendar.HOUR_OF_DAY;
import static java.util.Calendar.MINUTE;
import static java.util.Calendar.SECOND;
import static java.util.Calendar.MILLISECOND;

public class Today {
    public static void main(String[] args) {
        Calendar cal = Calendar.getInstance();
        cal.set(HOUR_OF_DAY, 0);
        cal.set(MINUTE, 0);
        cal.set(SECOND, 0);
        cal.set(MILLISECOND, 0);
        System.out.println(cal.getTime());
    }
}