Above example command will return the current timestamp and save values in ts object variable.
Following example will get the current time in milliseconds using getTime() function. After that Timestamp will convert it to proper time time. Below example is explained in multi line but if you want current time stamp only, Use above given one line code.
After executing above Java code you will get following values in return.
Time in Milli Seconds: 1447402821007 Current Time Stamp: 2015-11-13 13:50:21.007