Tagged articles
FunctionalProgramming
14 articles · Page 1 of 1
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

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

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

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

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

This article explains the pitfalls of NullPointerException in Java, introduces the Java 8 Optional API, details its core methods such as of, ofNullable, orElse, map, flatMap, and filter, and demonstrates practical refactorings that replace verbose null‑checks with concise, readable functional code.
FunctionalProgrammingJavaJava8
0 likes · 10 min read

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

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.
FunctionalProgrammingJavaJava8
0 likes · 22 min read

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

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

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

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.
FunctionalProgrammingJavaJava8
0 likes · 6 min read

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.
APIFunctionalProgrammingJava
0 likes · 23 min read

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
