I am working on selenium webdriver and want to set the current date
<p>I tried doing this:</p>

<pre><code>Date date = new Date();
String lastDate = (date.toString().trim());
// display time and date using toString()
System.out.println(date.toString());
</code></pre>

<p>but here the system date is being displayed as:</p>

<pre><code>"Wed Apr 13 15:39:50 IST 2016"
</code></pre>

<p>and all I need is "MM/dd/yyyy"</p>