Tag

Java8

0 views collected around this technical thread.

Architect's Guide
Architect's Guide
Feb 24, 2025 · Backend Development

Using Java Optional to Prevent NullPointerException

This article introduces Java 8's Optional class, explains its creation methods and common operations such as get, isPresent, ifPresent, filter, map, flatMap, orElse, orElseGet, orElseThrow, and shows practical usage scenarios and best‑practice recommendations for handling null values in backend code.

BackendFunctional ProgrammingJava
0 likes · 15 min read
Using Java Optional to Prevent NullPointerException
Java Architect Essentials
Java Architect Essentials
Jan 3, 2025 · Backend Development

Using Java 8 Optional to Prevent NullPointerException: Methods, Examples, and Best Practices

This article introduces Java 8's Optional class as a robust solution for avoiding NullPointerException, explains its creation methods, demonstrates common operations such as get, isPresent, ifPresent, filter, map, flatMap, orElse, orElseGet, orElseThrow, and provides practical usage scenarios and cautions for developers.

BackendBestPracticesJava
0 likes · 16 min read
Using Java 8 Optional to Prevent NullPointerException: Methods, Examples, and Best Practices
macrozheng
macrozheng
Dec 30, 2024 · Backend Development

Master Java Stream API: From Basics to Advanced Collection Operations

This article introduces Java Stream API introduced in JDK 8, explains its pipeline concept, and demonstrates practical operations such as traversal, filtering, deduplication, type conversion, collection‑to‑map transformations, pagination, matching, and parallel processing with clear code examples.

BackendCollectionsJava
0 likes · 15 min read
Master Java Stream API: From Basics to Advanced Collection Operations
macrozheng
macrozheng
Dec 19, 2024 · Backend Development

Master Java Optional: Clean Null Handling with Real-World Examples

This article introduces Java's Optional class, explains why null checks cause clutter, demonstrates how to replace traditional three‑level null‑checking with concise Optional chains, and provides detailed examples of all core Optional methods such as empty, of, ofNullable, isPresent, get, ifPresent, filter, map, flatMap, orElse, orElseGet, and orElseThrow.

BackendJavaJava8
0 likes · 11 min read
Master Java Optional: Clean Null Handling with Real-World Examples
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 19, 2024 · Fundamentals

Mastering Java Map: 12 Powerful Methods Every Developer Should Know

This article introduces Java's Map interface, explains the expanded API added since Java 8, and provides practical code examples for methods such as getOrDefault, forEach, replaceAll, computeIfAbsent, merge, and the immutable factories introduced in Java 9, helping developers deepen their collection framework knowledge.

BackendCollectionsJava
0 likes · 10 min read
Mastering Java Map: 12 Powerful Methods Every Developer Should Know
macrozheng
macrozheng
Jul 23, 2024 · Fundamentals

Mastering Java Optional: Eliminate NullPointerExceptions with Clean Code

This article explains why NullPointerExceptions occur, introduces Java's Optional as a concise alternative to explicit null checks, demonstrates practical code transformations, and reviews all core Optional methods introduced in JDK 8 to improve readability and safety of Java applications.

CodeCleanlinessJavaJava8
0 likes · 10 min read
Mastering Java Optional: Eliminate NullPointerExceptions with Clean Code
Top Architect
Top Architect
Jul 8, 2024 · Backend Development

Using Java 8 Stream API for Collection Processing with Practical Examples

This article introduces Java 8 Stream API, explaining its declarative approach to processing collections, and demonstrates common operations such as filter, map, sorted, forEach, collect, statistics, and parallelStream with a PO class example, while also including full source code and brief promotional notes.

BackendCollectionsJava
0 likes · 11 min read
Using Java 8 Stream API for Collection Processing with Practical Examples
Top Architect
Top Architect
Apr 26, 2024 · Backend Development

Comprehensive Guide to Java 8 Stream API with Practical Examples

This article provides an in-depth tutorial on Java 8 Stream API, covering stream creation, intermediate and terminal operations, filtering, mapping, reduction, collection, sorting, grouping, and practical code examples, helping developers master functional programming with streams in Java.

Functional ProgrammingJavaJava8
0 likes · 24 min read
Comprehensive Guide to Java 8 Stream API with Practical Examples
Top Architect
Top Architect
Jan 31, 2024 · Backend Development

Java 8 Functional Interfaces and Stream Operations: A Comprehensive Guide

This article explains Java 8's lambda expressions and functional interfaces, demonstrates common functional interfaces with code examples, and shows how to use Stream API operations such as filter, map, flatMap, collect, max/min, count, reduce, and advanced collectors for efficient backend development.

JavaJava8backend development
0 likes · 14 min read
Java 8 Functional Interfaces and Stream Operations: A Comprehensive Guide
Architecture Digest
Architecture Digest
Jan 25, 2024 · Backend Development

Understanding Java 8 Functional Interfaces and Stream Operations

This article explains Java 8's lambda expressions, functional interfaces, and the Stream API, demonstrating how immutable values and functions enable concise data processing through lazy and eager evaluation, with practical code examples covering predicates, consumers, mapping, filtering, grouping, and reduction.

JavaJava8collectors
0 likes · 12 min read
Understanding Java 8 Functional Interfaces and Stream Operations
Code Ape Tech Column
Code Ape Tech Column
Nov 10, 2023 · Fundamentals

Why HashMap.keySet() Traversal Performs Two Passes While entrySet() Traversal Performs One

This article explains the internal mechanics of HashMap traversal in Java, showing that keySet() uses an iterator that iterates twice to locate entries, whereas entrySet() (or Map.forEach) iterates only once, and it walks through the relevant source code and decompiled bytecode to illustrate the process.

HashMapIteratorJava
0 likes · 8 min read
Why HashMap.keySet() Traversal Performs Two Passes While entrySet() Traversal Performs One
TAL Education Technology
TAL Education Technology
Nov 2, 2023 · Backend Development

Java CompletableFuture: Creation, Asynchronous Callbacks, Composition, and Thread‑Pool Configuration

This article explains Java's CompletableFuture utility introduced in Java 8, covering its creation methods, asynchronous callback functions, exception handling, task composition, combination operators, underlying implementation details, and best practices for configuring thread pools to achieve efficient concurrent execution.

CompletableFutureJavaJava8
0 likes · 32 min read
Java CompletableFuture: Creation, Asynchronous Callbacks, Composition, and Thread‑Pool Configuration
Java Architect Essentials
Java Architect Essentials
Nov 1, 2023 · Backend Development

Understanding Java 8 Optional API: Methods, Usage, and Practical Examples

This article explains how Java 8's Optional class helps avoid NullPointerException by providing a fluent API—including ofNullable, empty, orElse, map, flatMap, filter, and other methods—along with concrete code examples that demonstrate refactoring traditional null‑check logic into concise, functional style.

Functional ProgrammingJavaJava8
0 likes · 10 min read
Understanding Java 8 Optional API: Methods, Usage, and Practical Examples
Architect
Architect
Oct 11, 2023 · Backend Development

Understanding and Using Java Optional to Avoid NullPointerException

This article explains the purpose and usage of Java 8's Optional class, demonstrates how to create and manipulate Optional objects, compares its various methods such as get, isPresent, ifPresent, filter, map, flatMap, orElse, orElseGet, orElseThrow, and highlights JDK 9 enhancements and practical best‑practice scenarios.

JavaJava8Optional
0 likes · 15 min read
Understanding and Using Java Optional to Avoid NullPointerException
Top Architect
Top Architect
Oct 11, 2023 · Backend Development

Comprehensive Guide to Java 8 Stream API with Practical Code Examples

This article provides an in-depth tutorial on Java 8 Stream API, covering its concepts, creation methods, intermediate and terminal operations, mapping, reduction, collection, grouping, sorting, and includes numerous practical code examples to help developers master functional programming with streams.

CollectionsFunctional ProgrammingJava
0 likes · 26 min read
Comprehensive Guide to Java 8 Stream API with Practical Code Examples
Architecture Digest
Architecture Digest
Sep 18, 2023 · Backend Development

Using Java 8 Optional to Avoid NullPointerException: API Overview and Practical Examples

This article explains the NullPointerException problem in Java, introduces the Java 8 Optional class, details its constructors and key methods such as of, ofNullable, empty, orElse, orElseGet, orElseThrow, map, flatMap, isPresent, ifPresent, and filter, and provides practical code examples demonstrating more elegant null‑handling.

APIFunctionalProgrammingJava
0 likes · 10 min read
Using Java 8 Optional to Avoid NullPointerException: API Overview and Practical Examples
Selected Java Interview Questions
Selected Java Interview Questions
Sep 12, 2023 · Backend Development

Comprehensive Guide to Java 8 Stream API with Practical Examples

This article explains the concepts, creation methods, and extensive usage patterns of Java 8 Stream API—including filtering, mapping, reducing, collecting, sorting, and combining—through detailed code examples that demonstrate how to process collections efficiently with lambda expressions.

CollectionsFunctional ProgrammingJava
0 likes · 23 min read
Comprehensive Guide to Java 8 Stream API with Practical Examples
Architect's Guide
Architect's Guide
Sep 12, 2023 · Backend Development

Using Java 8 Optional API to Eliminate NullPointerException

This article explains how Java 8's Optional class and its methods—of, ofNullable, empty, orElse, orElseGet, orElseThrow, map, flatMap, isPresent, ifPresent, and filter—can replace verbose null‑checks, making code more concise and safer while providing concrete examples and source code.

APIBackendFunctional Programming
0 likes · 10 min read
Using Java 8 Optional API to Eliminate NullPointerException
Java Architect Essentials
Java Architect Essentials
Aug 31, 2023 · Backend Development

Comprehensive Guide to Java 8 Stream API with Practical Examples

This article provides an in‑depth tutorial on Java 8 Stream API, explaining its concepts, intermediate and terminal operations, and demonstrating over twenty practical code examples—including filtering, mapping, reducing, collecting, grouping, and parallel streams—to help developers master functional-style data processing in Java.

CollectionsFunctional ProgrammingJava
0 likes · 21 min read
Comprehensive Guide to Java 8 Stream API with Practical Examples
Architecture Digest
Architecture Digest
Jul 25, 2023 · Backend Development

Understanding Java 8 Optional: API Overview, Core Methods, and Practical Usage

This article explains the NullPointerException problem, shows traditional null‑checking code, introduces Java 8's Optional class with its constructors and key methods such as of, ofNullable, orElse, orElseGet, orElseThrow, map, flatMap, isPresent, ifPresent, and filter, and provides several real‑world examples illustrating how to replace verbose null checks with elegant Optional‑based code.

BackendFunctionalProgrammingJava
0 likes · 10 min read
Understanding Java 8 Optional: API Overview, Core Methods, and Practical Usage