鉴于:
public class LineUp {
public static void main(String[] args) {
double d = 12.345;
// insert code here
}
}
在第 4 行插入的哪个代码片段产生输出| 12.345|
?
A. System.out.printf("|%7d| \n", d); B. System.out.printf("|%7f| \n", d); C. System.out.printf("|%3.7d| \n", d); D. System.out.printf("|%3.7f| \n", d); E. System.out.printf("|%7.3d| \n", d); F. System.out.printf("|%7.3f| \n", d); Answer: F
printf 语句的解释是什么,为什么是 |%7d| 正在给illegalFormatConversionException ?
谢谢