我试图理解为什么我的 printf 语句之一失败。下面的#1 很好,但#2 失败,最后出现异常。这是什么原因造成的?
0 String LOCATION = "http://www.mywebsite.web/";
1 System.out.printf(" <img src=\"%sIMAGE.gif\">", LOCATION);
2 System.out.printf(" <img src=\"%sIMAGE.gif\" width=\"25%\" height=\"25%\" border=0>", LOCATION);
Exception in thread "main" java.util.UnknownFormatConversionException: Conversion = '"'
at java.util.Formatter.checkText(Formatter.java:2519)
at java.util.Formatter.parse(Formatter.java:2501)
at java.util.Formatter.format(Formatter.java:2430)
at java.io.PrintStream.format(PrintStream.java:937)
at java.io.PrintStream.printf(PrintStream.java:838)
at MyCode.main(MyCode.java:292)
任何想法是什么原因造成的?