方法一:
System.out.println(System.currentTimeMillis());
方法二: java.util.Date 工具类
Date date = new Date();
System.out.println(date.getTime());
方法三: java.util.Calendar 工具类
Calendar calendar = Calendar.getInstance();
long time = calendar.getTimeInMillis();
System.out.println(time);