This post originated from an RSS feed registered with Java Buzz
by justin cater.
Original Post: The Optional Type API
Feed Title: Java Code Geeks
Feed URL: http://feeds.feedburner.com/JavaCodeGeeks
Feed Description: Java 2 Java Developers Resource Center
Java 8 introduces the Optional class. In a nutshell, instead of returning null, and then checking for null, you return an Optional instance, which can either have or not have a value set. That way you don’t fail with NullPointerException. I won’t discuss whether the Optional type will eliminate NPEs completely (it won’t). Instead I’ll […]