英文:
How can i print this literal in PrintWriter Java
问题
我正在阅读一个 .xls 文件,其中有一些内容类似于 "100% CDI"。
我尝试了:
result = String.format(line, "%%")
但它抛出了 IllegalFormatConversionException 异常。
英文:
i´m reading a .xls and there are some lines with a content like "100% CDI".
I tried it:
result = String.format(line, "%%")
But it throwed a IllegalFormatConversionException.
答案1
得分: 0
请添加更多细节。我不确定你为什么在使用String.format。你可以简单地使用:
String result = line;
英文:
please add more details. I am not sure why are you using String.format. You could simply use:
String result=line;
专注分享java语言的经验与见解,让所有开发者获益!
评论