Java Generics Naming Convention

In this post, we will discuss the Java generics naming conventions with examples.

Read complete Java naming conventions at

Generic types naming conventions

Generic type parameter names should be uppercase single letters. The letter 'T' for a type is typically recommended. In JDK classes, E is used for collection elements, S is used for service loaders, and K and V are used for map keys and values.
public interface Map <K,V> {}
public interface List<E> extends Collection<E> {}
Iterator<E> iterator() {}
The most commonly used type parameter names are:
  • E - Element (used extensively by the Java Collections Framework)
  • K - Key
  • N - Number
  • T - Type
  • V - Value
  • S,U,V etc. - 2nd, 3rd, 4th types


Free Spring Boot Tutorial - 5 Hours Full Course

Watch this course on YouTube at Spring Boot Tutorial | Fee 5 Hours Full Course