-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)
什麼可以在可能的解決方案與格式打印這個說法?