Java : Adding days to a date

Varun   Varun 660 Views

Adding days to a date in Java

  
 public static Date addDays(Date inputDate, int days){
        Calendar c = Calendar.getInstance();
        c.setTime(inputDate);
        c.add(Calendar.DATE, days);
        return c.getTime();   
    }