According to my task, I need to save the object of type Date to a file, and then restore this object from the file. Serialization can not be used.
So here. Such a thing does not work: new Date(date.toString()) . Then in what format should the date be saved so that it would be convenient to read it later?
new Date(date.getTime())). - Nofate ♦java.util.Dateand use Joda Time (before Java 8) orjava.time(after Java 8). - Nofate ♦