How to get the month from todays date

I actually need the current month. So I was sing the following code
But the problem is that when I print the month, it gives me 5 instead of 6 which is the current month.

Any help will be greatly appreciated. When I print the whole date, it prints the right date

Date todays_date  = new Date();
      String this_month = new Integer(todays_date.getMonth()).toString();
      out.print(this_month);
huzefaqAsked:
Who is Participating?
 
rrzConnect With a Mentor Commented:
It is zero based. Month are from  0-11  The method is deprecated anyway.  You should use  Calendar.get(Calendar.MONTH)
0
All Courses

From novice to tech pro — start learning today.