how to retrieve max date of the month entered by user?

hi all,

i am retrieving month n year from the user .

but my problem is how can i retrieve the max date of that month ?

for example suppose user selects the "march" n "2006" year then i want 31 as a max date, if user selects "feb" n 2004 i want 29 as a max date .

please help me out

thanxs

[326 byte] By [java_usera] at [2007-10-2 16:50:36]
# 1
See the GregorianCalendar API. You can set the year and month fields and then call getMaximum on the day field.
BaltimoreJohna at 2007-7-13 18:02:13 > top of Java-index,Desktop,Core GUI APIs...
# 2
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Calendar.html#getActualMaximum(int)
Michael_Dunna at 2007-7-13 18:02:13 > top of Java-index,Desktop,Core GUI APIs...