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.
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're 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'll 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 howto handle nulls effectively with the course, Working with Nulls in Java at Pluralsight.