Programming Tips - How can I make a nice timestamp?

Date: 2016nov17 Language: Java Keywords: log, logging Q. How can I make a nice timestamp? A. Use SimpleDateFormat like this:
SimpleDateFormat stampFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String timeStamp() { Date date = new Date(); return stampFormat.format(date); }