Hi everyone, I am working on a school project and I am stuck in this line. The code works and I get the result I need but they are all in the same line.
JOptionPane.showMessageDialog(null, "Subtotal: " + String.format("%5.2f", subTotal) + "Tax: " + String.format("%5.2f", orderTax) + "Total: " + String.format("%5.2f", saleTotal));
I tried using "\n" to make it show in three different lines but I get an error saying illegal character.
Can someone explain to me how to break this line in three separate lines?