在CustomsData类里有一个小写的常量,是有特别的意思么?
private static final Customer[] customers;
static{
int size = CUSTOMER_DATA.length;
customers = new Customer[size];
for (int i = 0; i < size; i++)
}
百度了一下,在java中的颜色也有大写和小写,但是只是版本升级之后由于规范新增了大写的颜色常量。
java规范是应该大写常量。所以,不明白是为啥。
printf函数的JDK定义为public PrintWriter printf(String format,
Object... args)
意思是将args按照format这种格式,写进PrintWriter中。
Object... args指的是多个对象。
我们使用的是out.printf(format,msgs);
out是前面定义的一个PrintStream
output("%1$s.%2$s%n",i+1,options[i]);
这个调用是指
一个两列的格式,一列是i+1,另一列是options[i]
2719

被折叠的 条评论
为什么被折叠?



