// 日期格式化技术 ,当前时间格式化成该格式
Date date = new Date();// 获得当前日期时间
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String str=dateFormat.format(date);
system.out.println("输出日期:"+str);
Date date = new Date();// 获得当前日期时间
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String str=dateFormat.format(date);
system.out.println("输出日期:"+str);