【发布时间】:2021-06-01 17:37:37
【问题描述】:
考虑以下代码(main 方法的摘录):
String str = "The result: ";
int c = 5;
int k = 3;
System.out.println(str + c + k); // This would concatenate the all values, i.e. "The result: 53"
如果唯一允许修改的内容在System.out.println()内,是否可以将str连接到k和c之和?
【问题讨论】:
标签: java string sum integer concatenation