New Date in Java

I've been working quite a lot in Java. Although this is part of the university course, we actually have some QAs we need to satisfy, and so the quality of the code matters. Most modern languages are Turing Complete, so it is rarely about what you can do, but rather how you can do it. Every now and again (more often than not actually), I came across painfully annoying Java constructs which make the code that much harder to read and write. Like today, I tried to instantiate new date. In C# and probably any other language:

Since Java 7, this kind of construct is depreciated. Instead, one should use:

Leave Comment

Your email address will not be published.

Please type the characters of this captcha image in the input box

Please type the characters of this captcha image in the input box