这是我的代码:
int hoursFormat = 1, minsFormat = 2, secsFormat = 3;
String timeFormat = String.format("%02d:%02d:%02d",hoursFormat, minsFormat, secsFormat);
Run Code Online (Sandbox Code Playgroud)
这给出了编译错误:
Unresolved compilation problem:
The method format(String, Object[]) in the type String is not applicable for the
arguments (String, int, int, int)
Run Code Online (Sandbox Code Playgroud)
为什么我在这里收到此错误,如何解决?