In this post we will learn to print current date in java with examples
Here we used Date.java from java.util package
In this example the time zone will be your default system time zone
Example
import java.util.Date;
public class DateExample {
public static void main(String[] args) {
Date date = new Date();
System.out.println("Current Date : " + date);
}
}
Output
Current Date : Mon Dec 23 21:35:59 IST 2019
Reference
https://beginnersbug.com/add-3-days-to-the-current-date-in-java/