The method format(String, Object[]) in the type String is not applicable for the arguments (…)

后端 未结 6 1567
耶瑟儿~
耶瑟儿~ 2020-11-28 14:27

Here is my code:

int hoursFormat = 1, minsFormat = 2, secsFormat = 3;
String timeFormat = String.format(\"%02d:%02d:%02d\",hoursFormat, minsFormat, secsForma         


        
6条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 14:56

    You have jdk 1.4 or below version. The method String.format() is introduce in Jdk 1.5.

    Take a look at coderanch post.

提交回复
热议问题