Creating a new Date or DateTime with ease in Java

For a school application in Java, we had to make a coffee application. The coffee application is a very small application, but trains a few very hard techniques like observer and composition.

Each time an amount of 1 – 10 coffees are made, a log entry has to be stored. With how much coffees there have been made, and the date time of it.

So I needed the date and time it was NOW, to store. Unfortunately I could’t find easy ways to do this, on line. That’s why I’ve searched a good way, and will share it with everyone, on eurekadesign.be!

Read the rest of this entry »