线程“main” java.util.MissingFormatArgumentException中的异常:格式说明符'10s'
2022-09-04 06:06:15
毫无疑问,我在这里错过了一些非常明显的东西,但我无法弄清楚。任何帮助将不胜感激。错误来自这里:
package B00166353_Grades;
public class Student{
String name,banner;
public Student(String name,String banner){
this.name=name;
this.banner=banner;
}
public String toString(){
String productDetails=new String();
productDetails+=String.format("%-20s%10.2s%10s",this.name,this.banner);
return productDetails;
}
}