Browse by Topic
Popular
Popular Posts
Latest
Latest Java Posts
Java Record Patterns: Destructuring and Matching
Learn how Java record patterns destructure records in pattern matching, including nested patterns, switch integration, and common pitfalls.
Java Guarded Patterns: Matching with Conditions
Use the when clause in Java switch pattern matching to add conditions to type and record patterns. Includes syntax, examples, and common pitfalls.
Java Type Patterns: instanceof and switch
Learn how Java type patterns simplify instanceof checks and switch statements, with practical examples of pattern variables, flow scoping, guarded patterns, and record patterns.
Java Pattern Matching Switch
java pattern matching switch: Learn how to use pattern matching for switch in Java: syntax, guarded patterns, exhaustiveness, null handling, and practical migration tips.
Java Pattern Variables: Cleaner Type Checks Without Casts
java pattern variable: Understand Java pattern variables: how they simplify instanceof checks and switch patterns, their scope rules, and version requirements.
Java var vs Object: Type Inference vs Explicit Reference
java var vs object: Understand the difference between Java's var and Object declarations, how type inference works, and when to use each for maintainable code.
Using var with Lambda Expressions in Java
How var interacts with lambda expressions in Java: why var cannot hold a lambda, how var works in lambda parameters since Java 11, and the all-or-nothing rule.
Java var with Generics: Type Inference Explained
Understand how Java's var keyword infers generic types, including the diamond operator, generic method calls, anonymous classes, and common pitfalls.
Java Local Variable Type Inference: Using var Effectively
java local variable type inference: Learn how Java's var keyword works, where it can be used, and how it affects readability, maintainability, and runtime behavior in...
Java Immutable vs Unmodifiable Collection: Key Differences
Understand the difference between immutable and unmodifiable collections in Java, including behavior, performance, and when to use each.