如果我有
'String t = "";
int i = 1;
double d = 3.3;'
我可以吗
t = t + " " + i + " " + d
或者我需要施展?
答案 0 :(得分:3)
是的,你可以......不需要施展......
你可以像你说的那样做,t = t + " " + i + " " + d;
答案 1 :(得分:0)
没有。你没有
t = t + " " + i + " " + d --> "New" String = string + " " + String.valueOf(integer) + " " + String.valueOf(double)
答案 2 :(得分:0)
试一试:
double total = 10;
String total = String.valueOf(total);