Java guides
Every published Java guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Java guides
Most readLatest Java guides
Page 5 of 109Java Collection vs Stream: Choosing the Right API
Understand the differences between Java collections and streams, including eager vs lazy evaluation, mutability, and when to use each API.
Java Queue vs Deque: Choosing the Right Collection
java queue vs deque: Understand the differences between Java Queue and Deque, their implementations, and when to use each for efficient data handling.
Java Map vs HashMap: Interface vs Implementation
Understand the difference between Java's Map interface and the HashMap implementation, when to use HashMap, and how to choose the right Map implementation.
Java List vs Array: Key Differences and Use Cases
Understand the key differences between Java arrays and List implementations, including type safety, primitives, performance, and when to use each.
Java Collection vs Collections: Interface or Utility Class?
Java Collection vs Collections: Understand the difference between the Collection interface and the Collections utility class in Java, including usage and common methods.
Java Bridge Methods: How the Compiler Preserves Type Information
Java bridge methods are synthetic compiler-generated methods that preserve type information after erasure. Learn why they appear with generics and covariant return types, how to inspect them with javap, and how reflection sees them.
Java Bounded Wildcards: Syntax and Use Cases
See how Java bounded wildcards (? extends T and ? super T) let generic methods accept related types while keeping compile-time checks intact.
Java Generic Method vs Wildcard: Choosing the Right Approach
Generic methods and wildcards both make Java APIs flexible, but they serve different purposes. This article explains the practical difference between them and when each approach is the better choice.
Java Wildcard Super: Using ? super T Correctly
java wildcard super: Understand the `? super T` wildcard in Java generics, its role in the PECS rule, and how to use it for flexible, type-safe collection methods.
Java Wildcard Extends: Upper Bounded Generics
Understand how `? extends T` works in Java generics: when to use the upper bounded wildcard, its write restrictions, and how it differs from generic methods.