In JAVA,
Calendar Target_Date = Calendar.getInstance();
Target_Date.set(YEAR,Integer.parseInt(req.getParameter("date").split("-")[0]));
gives error that YEAR cannot be resolved to a variable. Am I not using set() correctly? I want to change Target_Date‘s year.
YEARis static and you should use it asCalendar.YEARunless you have a static import.