Tagged articles
6 articles
Page 1 of 1
Selected Java Interview Questions
Selected Java Interview Questions
Apr 26, 2026 · Fundamentals

Java Generics: T, E, K, V, and ?—Do You Still Mix Them Up?

This article explains why Java generics are essential, clarifies the conventional meanings of type parameters T, E, K, V, describes how to use unbounded, upper‑bounded and lower‑bounded wildcards, introduces the PECS rule, details type erasure, and lists common pitfalls with practical code examples.

GenericsPECSType Erasure
0 likes · 14 min read
Java Generics: T, E, K, V, and ?—Do You Still Mix Them Up?
Architect's Tech Stack
Architect's Tech Stack
Nov 5, 2025 · Backend Development

Master Java Generics: Why T, E, K, V, and ? Matter and How to Use Them

This article explains the purpose of Java generics, the differences between type parameters like T, E, K, V and wildcards ?, demonstrates non‑generic versus generic implementations with concrete code examples, and introduces the PECS principle for choosing appropriate wildcards in production code.

GenericsPECSType Parameters
0 likes · 11 min read
Master Java Generics: Why T, E, K, V, and ? Matter and How to Use Them
Java Tech Enthusiast
Java Tech Enthusiast
Oct 30, 2025 · Backend Development

Master Java Generics: When to Use T, E, K, V, and Wildcards

This article explains why Java generics improve type safety, demonstrates how to replace raw Object containers with generic classes, clarifies the conventional meanings of type parameters T, E, K, V and the wildcard ?, and introduces the PECS principle for choosing appropriate wildcards in API design.

GenericsPECSType Parameters
0 likes · 13 min read
Master Java Generics: When to Use T, E, K, V, and Wildcards
DaTaobao Tech
DaTaobao Tech
Nov 6, 2024 · Fundamentals

Understanding Java Generics: Origins, Features, and the PECS Principle

Java generics, introduced in Java 5 to replace unsafe Object usage, provide compile‑time type safety, clearer code, and eliminate unchecked casts by allowing type‑parameterized classes, methods, and collections, while type erasure and bridge methods preserve backward compatibility, and the PECS rule (producer extends consumer super) guides safe use of wildcards through covariance and contravariance.

GenericsPECSType Erasure
0 likes · 11 min read
Understanding Java Generics: Origins, Features, and the PECS Principle
Java Captain
Java Captain
Nov 15, 2017 · Fundamentals

Understanding Java Generics: Basics, Wildcards, Bounds, and Type Erasure

This article introduces Java generics, covering generic classes and methods, wildcard usage with the PECS principle, bounded type parameters, and the implications of type erasure, illustrating each concept with code examples and discussing common pitfalls such as generic arrays, bridge methods, and runtime type checks.

GenericsPECSReflection
0 likes · 17 min read
Understanding Java Generics: Basics, Wildcards, Bounds, and Type Erasure
Qunar Tech Salon
Qunar Tech Salon
Feb 12, 2015 · Fundamentals

Understanding Java Generics: Motivation, Structure, and Usage

This article provides a comprehensive overview of Java generics, explaining their motivation, syntax, type‑safety benefits, class and method declarations, wildcard usage, and best‑practice principles such as PECS, while illustrating concepts with clear code examples.

CollectionsGenericsPECS
0 likes · 12 min read
Understanding Java Generics: Motivation, Structure, and Usage