Issue while using Calender in User Defined Java Class

I am using Calender class function in java to get days of date. When I am trying to use that code in User defined java class, i am getting following error msg…

so is there any alternet solution for that ?

Code:

private long getDaysOfDate(int yyyy, int mm, int dd) {
		Calendar startCalendar = Calendar.getInstance();
	startCalendar.set(yyyy,mm,dd);
	long days = startCalendar.getTime().getTime()/(24*60*60*1000);	 
	return days;
}

Execution Screenshoot : (error log)

Dear Shubham,

Could you please import the required packages for the Calendar class and check?