我正在尝试使用 printf 来显示如下内容:
Temperature: # # # # # # # # # # # #
但是当我运行我的程序时,我得到了这个:
Temperature:Temperature:Temperature:Temperature:Temperature:Temperature:Temperature:Temperature:Temperature:Temperature:Temperature:Temperature:
69.0 67.0 66.0 64.0 66.0 69.0 67.0 67.0 70.0 69.0 69.0 70.0
这是我的代码片段:
System.out.printf("Temperature:", "%10.1f", temperature);
任何帮助将不胜感激。