public static void main(String[] args) {
Date now = new Date();
Date endTime = new Date(now.getTime() + 1000 * 60 * 60 * 24);
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
// 2022-06-27
System.out.println(dateFormat.format(now));
//2022-06-28
System.out.println(dateFormat.format(endTime));
}