java泛型

来源:互联网 发布:西门的淘宝店铺网址 编辑:程序博客网 时间:2024/05/21 14:54
Type Parameter Conventions
You have already seen the angle bracket and single letter notation used to 
represent a type parameter. By convention, a type parameter is a single, 
uppercase letter — this allows easy identification and distinguishes a type 
parameter from a class name. The most common type parameters you will see are:


<T> — Type
<S> — for Type, when T is already in use
<E> — Element (used extensively by the Java Collections Framework)
<K> — Key
<V> — Value

<N> — Number


避免重复的装箱和拆箱,和装箱拆箱时转错类型