因此,用Integer型的循环变量来遍历一个int[]型的数组,或者用byte型的循环变量来遍历一个 Collection< Byte>,也是可行的。 清单12:使用能和要被遍历的对象中的元素的类型自动转换的类型的循环变量 int[] integers = {1, 2, 3, 4}; for (Integer i : integers) { System.out.println(i);/* 依次输出“1...