获取系统时间

       Date curDate = new Date(System.currentTimeMillis());
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss ");
//        SimpleDateFormat formatter = new SimpleDateFormat("yyy:HH:mm:ss");
        String str = formatter.format(curDate);
        System.out.println("输出"+str);
原文地址:https://www.cnblogs.com/Ocean123123/p/13818903.html