如何在一行中打印多个System.out.printf语句?

时间:2018-06-28 01:04:09

标签: java

我想将两个printf语句行作为一行。我尝试过但无法做到。我需要帮助。先感谢您。

以下是声明:

System.out.printf("%s%n%s: $%,.2f%n",currentEmployee,"payroll",currentEmployee.earnings());

System.out.printf("birthday bonus: $100.00 = $%,.2f%n%n", currentEmployee.earnings()+100);

0 个答案:

没有答案
相关问题