按照惯例, 类型变量(泛型)的命名采用单个大写字母。这是为了区分普通变量名和泛型变量名。
常见的泛型命名有:
E - Element (used extensively by the Java Collections Framework)K - KeyN - NumberT - TypeV - ValueS, U, V etc. - 2nd, 3rd, 4th typesR - ResultA - Accumulator
按照惯例, 类型变量(泛型)的命名采用单个大写字母。这是为了区分普通变量名和泛型变量名。
常见的泛型命名有:
E - Element (used extensively by the Java Collections Framework)K - KeyN - NumberT - TypeV - ValueS, U, V etc. - 2nd, 3rd, 4th typesR - ResultA - Accumulator
相关文章: