-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)
を?