Java Calendar always shows the same time

后端 未结 5 1850
天命终不由人
天命终不由人 2020-12-07 05:05

Below is my code.

public class TestCalendar {

public static void main(String[] args){
    int unique_id = Integer.parseInt(\"\" + Calendar.HOUR + Calendar.M         


        
5条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 05:47

    I am not sure what is requirement but if you want system time then may be you can use this "System.currentTimeMillis()"

提交回复
热议问题