Back to Browse

Null Object Design Pattern vs Optional | how and when

808 views
Feb 2, 2024
18:36

🎯 In this comprehensive tutorial, we tackle Java's approach to null safety, focusing on the Null Object Design Pattern and the Optional class. By the end of this video, you'll have a solid understanding of how to elegantly handle null values in your Java applications, improving your code's reliability and maintainability. 📚 Learning Objectives: - Understand the Null Object Design Pattern - Java's Optional class usage - Learn through practical code examples - Ability to decide which one to opt for Null Object Design Pattern vs Java's Optional 👨‍💻 Example Code: https://github.com/arunveersingh/JavaCodeClinic/tree/main/javacodeclinic/src/main/java/com/oopsfeedmecode/example7 🔎 Prerequisites: Basic understanding of Java programming is recommended. ▶️ Code refactoring series: https://www.youtube.com/playlist?list=PL0rh0e_JogjlGDc0KUodpAbCVUtHIRZTO ⏰ Timestamps: 00:00 - Introduction 01:16 - The problem with nulls in Java 02:43 - Fixing problem using Java's Optional class 07:08 - Fixing problem using Null Object Design Pattern 16:58 - When to use each approach 👍 If you found this video helpful, please like, share, and subscribe for more Java tutorials. Have questions or insights? Leave a comment below! 📱 Follow me on Twitter: https://twitter.com/oopsfeedmecode 📩 [email protected] Disclaimer: This video is just to pass on an idea. You have to decide the which one to use in your codebase. Remember, happy coding! ---- #Java #NullSafety #OptionalClass #DesignPatterns #SoftwareEngineering #CodeRefactoring Java, Null Checks, Null Object Design Pattern, Optional, Code Refactoring, Software Engineering, Java Development, Code Maintenance, Null Safety Techniques, Java Programming

Download

0 formats

No download links available.

Null Object Design Pattern vs Optional | how and when | NatokHD