A formatter created from a pattern can be used as many times as necessary, it is immutable and is thread-safe. For example, 'd MMM uuuu' will format as ''. A pattern is used to create a Formatter using the ofPattern(String) and ofPattern(String, Locale) methods.
How do I fix it?) Solution: If you get this compilation error, it means that you have not included the servlet jar in the classpath. This SDK has the src files as well as the compiled JRE class files for Object, String etc. I have configured a SDK for the module project. Similarly other JRE/ java SDK classes cannot be resolved.