SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd" );
Calendar cal = Calendar.getInstance();
cal.setTime( dateFormat.parse( inputString ) );
cal.add( Calendar.DATE, 1 );
2. Using java.util.Date - this does't take care Daylight saving but might be required for certain use cases and especially in GWT where Calendar is not supported.
Date date = new Date(); Date daysAgo = new Date(date.getTime() - (1000*60*60*24));
3. Using 3rd party library. For example, http://joda-time.sourceforge.net
Date date = new Date(); // Or where ever you get it from
Date daysAgo = new DateTime(date).minusDays(300).toDate();