public static Date addMonths ( Date date , int numOfMonths ) { Calendar instance = Calendar . getInstance ( ) ; instance . setTime ( date ) ; instance . add ( Calendar . MONTH , numOfMonths ) ; return instance . getTime ( ) ; }
Adds the months .