java代码生成年月日时分秒

Date dt = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss");
String data = sdf.format(dt);