I tried doing this:
Date date = new Date();
String lastDate = (date.toString().trim());
// display time and date using toString()
System.out.println(date.toString());
but here the system date is being displayed as:
"Wed Apr 13 15:39:50 IST 2016"
and all I need is "MM/dd/yyyy"