-1
我试图以具有多个标题的表格格式打印显示数据。我使用以下printf
声明:具有多个参数的printf语句
System.out.format("%-15s %-15s %-25s %-15s %-20s %s %n", "Id", "name", "Mode", "Total weight", "Arrival loc", "Departure loc");
但是,生成以下错误:
Method format in the type PrintStream is not applicable for the arguments (String, String, String, String, String, String)
什么可以在可能的解决方案与格式打印这个说法?