错误信息:The method format(String, Object[]) in the type String is not applicable for the arguments (String, String)
源代码:
public void test1(){
String str=null;
str=String.format("Hi, %s", "林计钦"); // 格式化字符串
}
我是在myEclipse9.0中运行的
是否能运行和开发工具无关,和jdk版本有关。请查看是否正确配置了jdk,并且是1.5以上版本