如何在Java的PrintWriter中打印这个文字?

huangapple 未分类评论45阅读模式
英文:

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;

huangapple
  • 本文由 发表于 2020年4月7日 19:37:13
  • 转载请务必保留本文链接:https://java.coder-hub.com/61079189.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定