Tagged articles
14 articles
Page 1 of 1
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
Feb 15, 2023 · Backend Development

Mastering Java Optional: Creation, Methods, Real‑World Use Cases and Pitfalls

This article explains Java's Optional class, showing how to create empty or non‑empty instances, detailing key methods such as get, isPresent, ifPresent, orElse, orElseGet, orElseThrow, map, flatMap, filter, and illustrating practical service‑layer scenarios, JDK 9 enhancements, and when overusing Optional can hurt readability.

CodeExampleFunctionalProgrammingJDK9
0 likes · 10 min read
Mastering Java Optional: Creation, Methods, Real‑World Use Cases and Pitfalls
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.

FunctionalProgrammingjava8nullpointerexception
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.

APIFunctionalProgrammingjava8
0 likes · 9 min read
Understanding Java Optional: API Overview and Practical Usage
Java Backend Technology
Java Backend Technology
Dec 11, 2021 · Backend Development

Master Java 8 Streams: 20 Real‑World Examples to Boost Your Coding Efficiency

This tutorial introduces Java 8 Stream API, explains its core concepts, shows how to create streams from collections and arrays, and demonstrates 20 practical examples covering filtering, mapping, reducing, collecting, grouping, sorting and parallel processing to dramatically improve development productivity.

CollectionsFunctionalProgrammingJava
0 likes · 22 min read
Master Java 8 Streams: 20 Real‑World Examples to Boost Your Coding Efficiency
FunTester
FunTester
Nov 24, 2021 · Backend Development

Mastering Java Stream Collectors: Practical Examples and Code Walkthrough

This article provides a hands‑on guide to Java 8 Stream Collectors, demonstrating how to use toList, toSet, toCollection, toMap, summingInt, joining, groupingBy, partitioningBy and related collectors with clear code examples and output results.

BackendCollectorsDataAggregation
0 likes · 11 min read
Mastering Java Stream Collectors: Practical Examples and Code Walkthrough
Java Backend Technology
Java Backend Technology
May 6, 2021 · Backend Development

Master Java 8 Optional to Eliminate NullPointerExceptions

This article explains why NullPointerExceptions occur in Java, introduces the Optional API introduced in Java 8, details its core methods with source code examples, and demonstrates practical usage patterns that replace verbose null‑checks with concise, expressive functional code.

APIFunctionalProgrammingJava
0 likes · 9 min read
Master Java 8 Optional to Eliminate NullPointerExceptions
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.

CollectionsFunctionalProgrammingJava
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
Programmer DD
Programmer DD
Aug 8, 2018 · Fundamentals

Unlocking Java Lambdas: How Functional Interfaces Power Modern Code

This article explores Java 8 lambda expressions, demonstrating their syntax, how they map to functional interfaces like Runnable and Comparator, the role of the @FunctionalInterface annotation, and the practical use of UnaryOperator and Function interfaces in everyday code.

FunctionalInterfaceFunctionalProgrammingJava
0 likes · 14 min read
Unlocking Java Lambdas: How Functional Interfaces Power Modern Code