| 发表于:2007-03-30 13:01:3912楼 得分:0 |
exception in thread "main " java.util.illegalformatconversionexception: d != java .lang.string at java.util.formatter$formatspecifier.failconversion(formatter.java:397 8) at java.util.formatter$formatspecifier.printinteger(formatter.java:2705) at java.util.formatter$formatspecifier.print(formatter.java:2658) at java.util.formatter.format(formatter.java:2430) at java.io.printstream.format(printstream.java:899) at java.io.printstream.printf(printstream.java:800) at helloworld.main(helloworld.java:9) press any key to continue... 报这个错误信息 public class helloworld { public static void main(string args[]) { string year= "2007 "; string month= "3 "; string day= "2 "; string hour= "3 "; string minute= "32 "; string second= "33 "; system.out.printf( "%04d-%02d-%02d %02d:%02d:%02d ",year,month,day,hour,minute,second); } } | | |
|