Principles The class must document its self-use of overridable methods. A class may have to provide hooks into its internal workings in the form of judiciously chosen protected methods. The only way to test a class designed for inheritance is to writ
一.增强型for循环: 语法格式: 打印: A B C D E 当遍历集合或数组时,如果需要访问集合或数组的下标时,最好使用旧的方法来便利或循环,而不要用增强型for循环,因为它丢失了下标信息. 对于二维数组的循环: 二.自动装箱拆箱: 自动装箱就是对于基本数据类型: Integer i = 100; // 就等价于 Integer i = new Integer(100); 自动的把i装箱为一个对象. 自动拆箱: int n = i; // 只要是把i当成变量使用时,就是自