JDK API文档中,分别代表什么意思?

时间:2023-03-10 07:04:41
JDK API文档中,<E>、<T>、<?>分别代表什么意思?
Type ParameterConventions
You have already seen the angle bracketand single letter notation used to
represent a type parameter. By convention, a type parameter is asingle,
uppercase letter — this allows easy identification anddistinguishes a type
parameter from a class name. The most common type parameters youwill see are:

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