Tag

FunctionalProgramming

0 views collected around this technical thread.

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
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
Java Architect Essentials
Java Architect Essentials
Nov 2, 2022 · Backend Development

Using Java 8 Optional to Simplify Null‑Pointer Handling

This article introduces Java 8's Optional class, explains how to create Optional objects, demonstrates the most common methods such as get, isPresent, ifPresent, filter, map, flatMap, orElse, orElseGet, orElseThrow, compares similar APIs, provides real‑world service‑layer examples, and highlights JDK 9 enhancements, helping developers write safer, more readable code while avoiding NullPointerException.

BackendFunctionalProgrammingJava
0 likes · 12 min read
Using Java 8 Optional to Simplify Null‑Pointer Handling
Top Architect
Top Architect
Oct 20, 2022 · Backend Development

Mastering Java Optional: Preventing NullPointerException with Java 8

This article explains how Java 8's Optional class can be used to avoid NullPointerException by providing a comprehensive guide that covers creation, common methods, practical use‑cases, and recent JDK 9 enhancements, complete with code examples and best‑practice recommendations.

BestPracticesFunctionalProgrammingJava
0 likes · 14 min read
Mastering Java Optional: Preventing NullPointerException with Java 8
Java Architect Essentials
Java Architect Essentials
Apr 30, 2022 · Fundamentals

Understanding Java Optional: API Overview and Practical Usage

This article explains the NullPointerException problem, introduces the Java 8 Optional API—including constructors, of, ofNullable, empty, orElse, orElseGet, orElseThrow, map, flatMap, isPresent, ifPresent, and filter—provides source code snippets, and demonstrates how to replace verbose null‑checks with elegant Optional‑based implementations.

APIFunctionalProgrammingJava
0 likes · 9 min read
Understanding Java Optional: API Overview and Practical Usage
Selected Java Interview Questions
Selected Java Interview Questions
Nov 18, 2021 · Backend Development

Understanding Java Optional: API Overview and Practical Usage

This article explains the Java Optional class introduced in Java 8, covering its constructors, key methods such as of, ofNullable, orElse, map, flatMap, filter, and practical code examples that demonstrate how to replace verbose null‑checks with elegant functional-style expressions.

FunctionalProgrammingJavaJava8
0 likes · 9 min read
Understanding Java Optional: API Overview and Practical Usage
Architect's Tech Stack
Architect's Tech Stack
Apr 24, 2021 · Backend Development

Using Java 8 Map.merge() to Aggregate Student Scores

This article introduces Java 8's Map.merge() method, demonstrates how to replace verbose map‑update code with a concise merge operation for summing student scores, explains the underlying mechanism, and briefly mentions related map utilities such as compute and putIfAbsent.

BackendCollectionsFunctionalProgramming
0 likes · 6 min read
Using Java 8 Map.merge() to Aggregate Student Scores
Selected Java Interview Questions
Selected Java Interview Questions
Nov 2, 2020 · Backend Development

Java Stream API Overview and Practical Usage Examples

This article provides a comprehensive guide to Java 8 Stream API, covering its core characteristics, creation methods, essential interfaces, and common operations such as filtering, mapping, reducing, collecting, grouping, and sorting, with clear code examples for each concept.

APICollectionsFunctionalProgramming
0 likes · 23 min read
Java Stream API Overview and Practical Usage Examples