The same can be easily achieved using the SimpleDateFormat. You could easily do

DateFormat df = new SimpleDateFormat("YYYY/MM/dd");
String formatted = df.format(new Date());