初学者在格式字符串方面的斗争

时间:2018-09-28 05:28:56

标签: jcreator

告诉我不能将String转换为系统... 但我真的不知道我犯了什么错误... 在软件开发方面还是很新的。 请帮助我...

let tx = bitcore.Transaction();

tx.from(utxos);
tx.to(toAddress,sendAmountInSatoshi);
tx.change(fromAddress);
tx.fee(fee);
tx.sign(pKey);

1 个答案:

答案 0 :(得分:1)

String.format() 的返回类型为String

所以改变

   System formatString = String.format("%-15s%-10s\n%-15s%-10.1f\n%-15s%-10d",
                                          d,a,b,height,c,age);

   String formatString = String.format("%-15s%-10s\n%-15s%-10.1f\n%-15s%-10d",
                                          d,a,b,height,c,age);
相关问题