Problem with date

I have a date variable that holds the current date. Now i want to get a new date that comes after 7 days of this current date.Thanks in advance...
[153 byte] By [Ranjaya] at [2007-11-27 6:41:15]
# 1
> I have a date variable that holds the current date.> Now i want to get a new date that comes after 7 days> of this current date.Thanks in advance...No one is psycic over here. can you post some code.
fastmikea at 2007-7-12 18:10:47 > top of Java-index,Java Essentials,New To Java...
# 2
i have not written any code. I was thinking of writing one but i was not sure which function to use.
Ranjaya at 2007-7-12 18:10:47 > top of Java-index,Java Essentials,New To Java...
# 3
check the api docs for the calendar and date class
fastmikea at 2007-7-12 18:10:47 > top of Java-index,Java Essentials,New To Java...
# 4

that's one of the functions of the java.util.Calendar: http://java.sun.com/javase/6/docs/api/java/util/Calendar.html

Date date;

//...

Calendar cal = Calendar.getInstance();

cal.setTime(date);

cal.add(Calendar.DATE, 7);

date = cal.getTime();

System.out.println(date);

S_i_m_ua at 2007-7-12 18:10:47 > top of Java-index,Java Essentials,New To Java...