Course info
Dec 30, 2019
1h 12m
Your 10-day individual free trial includes:

Expert-led courses

Keep up with the pace of change with thousands of expert-led, in-depth courses.

How many times have you thought "this object can never be null" only to be proven wrong? In this course, Working with Nulls in Java, you'll learn best practices for effectively handling nulls and avoid NullPointerExceptions. First, you'll see what nulls mean and some common ways to deal with them. Next, you'll explore how to use annotations to check for nulls. Finally, you'll discover how to use the Null Object pattern and the Optional type to reduce unexpected exceptions even further. When you're finished with this course, you'll understand the different techniques to handle nulls effectively in Java programs.

About the author
About the author

Esteban Herrera has more than twelve years of experience in the software development industry. Having worked in many roles and projects, he has found his passion in programming with Java and JavaScript. Nowadays, he spends all his time learning new things, writing articles, teaching programming, and enjoying his kids.

More from the author
Developing Java Apps with Docker
3h 29m
Nov 4, 2021
Spring WebFlux: Getting Started
2h 39m
Aug 23, 2021
JUnit 5 Fundamentals
3h 7m
Jun 7, 2021
More courses by Esteban Herrera
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi, everyone. My name is Esteban Herrera. Welcome to my course, Working with Nulls in Java. I've been working with Java for more than 10 years. I love the language and teaching all I know about it. How many times have you thought this object can never be null just to be proven wrong with an ugly null pointer exception when you run your program? I bet more than one time, right? The fact is null pointer exception is one of the most common exceptions in Java programs. In this course, you are going to learn good practices and techniques for effectively handling nulls and avoid null pointer exceptions. Some of the major topics that we will cover include what exactly is null, checking for null using annotations, the null object pattern, and using optionals instead of nulls. By the end of this course, you will know how to deal with nulls effectively. Before beginning the course, you should have at least a basic knowledge of Java 8 or above. I hope you'll join me on this journey to learn how to handle nulls effectively with the course Working with Nulls in Java at Pluralsight.