Adding java code for post "Java - Get a date and time" on mehaul.me