I cannot understand why does the program keep telling me I have a mistake 'The constructor Date() is undefined' in code line 4. I was using it in Spring Tool Suite,but that doesn't matter I guess. Please,can someone explain what to do and how. If it's possible write the correction and do explain. Thanks in advance!
FYI,I know it is probably a stupid question,but I am a beginner.
@RequestMapping("/date")
public String date () {
DateFormat dateFormat = new SimpleDateFormat("yyy/MM/dd HH:mm:ss");
Date date = new Date();
return dateFormat.format(date);
}