java输出毫秒时间

SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
// 输出字符串
System.out.println(df.format(new Date()));