Tagged articles
24 articles
Page 1 of 1
macrozheng
macrozheng
Sep 17, 2025 · Backend Development

Master Elegant Null Checks in Java with StringUtils and ObjectUtils

This article explains how to replace repetitive !=null checks with efficient, type‑specific utility methods like StringUtils and ObjectUtils, offering a three‑step approach, code examples, and insights into their implementations for robust null handling in Java applications.

BackendObjectUtilsStringUtils
0 likes · 8 min read
Master Elegant Null Checks in Java with StringUtils and ObjectUtils
Java Architect Essentials
Java Architect Essentials
Sep 1, 2025 · Backend Development

Quick Null Checks in Java with StringUtils, ObjectUtils, CollectionUtils

This article explains how to replace repetitive !=null checks in Java by identifying the data type and using the appropriate utility classes—StringUtils for strings, ObjectUtils for objects, and CollectionUtils for collections—to perform concise and reliable null or empty evaluations, including code examples and discussion of edge cases.

CollectionUtilsObjectUtilsStringUtils
0 likes · 8 min read
Quick Null Checks in Java with StringUtils, ObjectUtils, CollectionUtils
php Courses
php Courses
Apr 22, 2025 · Backend Development

Using PHP’s is_null Function to Check for Null Variables

This article explains how the PHP is_null function can be used to determine whether a variable holds a null value, demonstrates its behavior with example code, and discusses the practical implications for conditional logic in backend development.

IS NULLnull checkphp-functions
0 likes · 4 min read
Using PHP’s is_null Function to Check for Null Variables
Su San Talks Tech
Su San Talks Tech
Mar 6, 2025 · Backend Development

Mastering Null Checks in Java: 10 Elegant Strategies for Safer Code

This article explores ten effective techniques for handling null values in Java, ranging from traditional if‑else checks to modern Optional usage, Lombok annotations, AOP interceptors, the Null Object pattern, Guava utilities, Kotlin‑style safety, and JDK 14 preview features, helping developers write cleaner, more robust code.

best practicesjavanull check
0 likes · 11 min read
Mastering Null Checks in Java: 10 Elegant Strategies for Safer Code
macrozheng
macrozheng
Jan 20, 2025 · Fundamentals

Master Elegant Null Checks in Java with Utility Classes

This article explains how to replace repetitive !=null checks in Java by identifying data types and using the appropriate Spring/Apache utility classes such as StringUtils, ObjectUtils, Collections, and CollectionUtils, providing code examples and best‑practice guidelines.

ObjectUtilsStringUtilscoding best practices
0 likes · 8 min read
Master Elegant Null Checks in Java with Utility Classes
Open Source Linux
Open Source Linux
Jan 7, 2025 · Fundamentals

Master Elegant Null Checks in Java with StringUtils and ObjectUtils

This guide explains how to efficiently and elegantly handle null pointer checks in Java by identifying data types, selecting the right utility classes such as StringUtils, ObjectUtils, Arrays, Collections, and applying their isEmpty methods to reduce repetitive code.

ObjectUtilsStringUtilscoding
0 likes · 7 min read
Master Elegant Null Checks in Java with StringUtils and ObjectUtils
Selected Java Interview Questions
Selected Java Interview Questions
Dec 17, 2024 · Backend Development

Efficient and Elegant Null Checks in Java Using Utility Classes

This article explains how to perform efficient and elegant null checks in Java by first identifying the data type, then selecting the appropriate utility class such as StringUtils, ObjectUtils, Collections or CollectionUtils, and finally applying the class’s isEmpty method with code examples for strings, arrays, lists, maps, and more.

ObjectUtilsStringUtilsbackend-development
0 likes · 7 min read
Efficient and Elegant Null Checks in Java Using Utility Classes
Architecture Digest
Architecture Digest
Dec 9, 2024 · Fundamentals

Efficient Null Checks in Java Using Utility Classes

This article explains how to efficiently perform null checks in Java by selecting appropriate utility classes such as StringUtils, ObjectUtils, Collections, and CollectionUtils for different data types, and also includes a brief notice about a free programmer book giveaway.

CollectionsObjectUtilsStringUtils
0 likes · 9 min read
Efficient Null Checks in Java Using Utility Classes
Top Architect
Top Architect
Jun 20, 2024 · Backend Development

When and How to Use Null Checks in Java: Best Practices and Alternatives

This article discusses the proper use of null‑checking in Java, distinguishes between valid and invalid null returns, proposes alternatives such as returning empty collections, using assertions or throwing exceptions, and demonstrates the Null Object pattern with concrete code examples while also noting related community resources.

Null Objectdefensive programmingjava
0 likes · 9 min read
When and How to Use Null Checks in Java: Best Practices and Alternatives
php Courses
php Courses
Feb 21, 2024 · Backend Development

Using PHP’s is_null Function to Check for Null Variables

This article explains how the PHP built‑in function is_null can be used to determine whether a variable holds a null value, demonstrates its behavior with example code, and describes the resulting true or false outcomes for different variable types.

IS NULLPHPVariables
0 likes · 4 min read
Using PHP’s is_null Function to Check for Null Variables
Architect's Guide
Architect's Guide
Feb 20, 2024 · Backend Development

Null Checks and Optional Usage in Java

This article explains common null‑checking techniques for objects, Lists, and Strings in Java, introduces the Optional class with its creation methods and typical usage scenarios, and compares various utility libraries to help avoid NullPointerException in real‑world projects.

ListStringbest-practices
0 likes · 6 min read
Null Checks and Optional Usage in Java
Java Architect Essentials
Java Architect Essentials
Oct 8, 2021 · Fundamentals

How to Avoid Excessive Null Checks in Java: Best Practices and the Null Object Pattern

This article explains why excessive null‑checking in Java code is problematic, distinguishes when null is a valid response versus an error, and offers practical techniques such as using assertions, throwing exceptions, returning empty collections, and applying the Null Object pattern to write cleaner, safer code.

Null Object patternassertionsjava
0 likes · 7 min read
How to Avoid Excessive Null Checks in Java: Best Practices and the Null Object Pattern
Top Architect
Top Architect
Sep 15, 2021 · Fundamentals

Avoiding Null Pointer Checks: When to Use Null, Assertions, and the Null Object Pattern

The article explains why excessive null‑checking in Java code is problematic, distinguishes between null as a valid response and null as an error, and offers practical techniques such as returning empty collections, using assertions, throwing exceptions, and applying the Null Object pattern to write cleaner, safer code.

Backendbest-practicesdesign pattern
0 likes · 7 min read
Avoiding Null Pointer Checks: When to Use Null, Assertions, and the Null Object Pattern
Top Architect
Top Architect
Apr 12, 2021 · Backend Development

Avoiding Null Checks in Java: When to Use Assertions, Exceptions, and the Null Object Pattern

The article explains why excessive null‑checking in Java code is problematic, distinguishes between null as a valid response and as an error, and offers practical techniques such as assertions, throwing exceptions, returning empty collections, and applying the Null Object pattern to write cleaner, safer backend code.

Null Object patternjavanull check
0 likes · 7 min read
Avoiding Null Checks in Java: When to Use Assertions, Exceptions, and the Null Object Pattern
Programmer DD
Programmer DD
Mar 25, 2021 · Backend Development

Hidden Traps in Java’s JDK: Avoid These Common Pitfalls

This article reveals frequent JDK pitfalls such as missing null checks in String.valueOf, fragile Integer.parseInt conversions, BigDecimal division errors, unmodifiable Collections.emptyList, and unsafe list iteration, providing concrete code examples and safe handling recommendations for Java developers.

BigDecimalCollectionsJDK
0 likes · 10 min read
Hidden Traps in Java’s JDK: Avoid These Common Pitfalls
Programmer DD
Programmer DD
Nov 9, 2020 · Backend Development

When to Use StringUtils.isEmpty vs isBlank in Java?

This article explains the differences between Apache Commons Lang's StringUtils.isEmpty, isBlank, and their complementary methods, shows their source implementations, and offers a recommendation to prefer isBlank for more comprehensive null and whitespace checks.

Apache CommonsStringUtilsisBlank
0 likes · 3 min read
When to Use StringUtils.isEmpty vs isBlank in Java?
Java Backend Technology
Java Backend Technology
May 7, 2020 · Backend Development

Eliminate Excessive Null Checks: Cleaner Java Code Without try‑catch

This article explains why overusing null‑check statements and try‑catch blocks makes Java code messy, distinguishes valid and invalid null returns, and offers practical techniques such as assertions, exceptions, empty collections, and the Null Object pattern to write safer, more concise code.

Design PatternsNull Objectbest practices
0 likes · 6 min read
Eliminate Excessive Null Checks: Cleaner Java Code Without try‑catch