Java generate random int from timestamp
<p>I am trying to generate a random int from timestamp, but below java code gives output in following format.</p>

<pre><code>java.util.Date date= new java.util.Date();
System.out.println(new Timestamp(date.getTime()));
</code></pre>

<p>Output : </p>

<blockquote>
  <p>2010-03-08 14:59:30.252</p>
</blockquote>

<p>Any java equivalent for python <code>print time.time()</code> which gives output like <code>1472916832.39</code></p>

<p>You can use
System. currentTimeMillis() or  System.nanoTime()</p>

java python timestamp