这是我的代码:
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)
为什么我在这里收到此错误,如何解决?
我正在尝试执行一个grep命令,查找文件中的所有行,其中第一个单词以"as"开头,而第一个单词也以"ng"结尾
我将如何使用grep进行此操作?