我需要编写一个程序,其中输出将与输入在同一行。我试过 print() 和 println() 但结果是一样的。我需要添加什么?
String str= scanner.next();
System.out.println(" donut");
输出是(如果我要输入苹果)
apple
donut
但我想要它打印
apple donut
慕尼黑5688855
相关分类