Java Program that add n or 100 number of days to the current date & display new date & time
Programimport java.util.*;
class Add100days
{
public static void main(String args[])
{
Date date=new Date();
long msec=date.getTime();
msec+=100*24*60*60*1000L;
date.setTime(msec);
System.out.println(date)
}
}
No comments:
Post a Comment