Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Optional orElse vs orElseGet

Java 8 introduced a fantastic concept of Optional, which we looked into in our blog Java 8 Optional. So just to give a short recap, Optional is used to represent Optional object or empty value instead null reference. This will help to avoid null pointer exception which occurs when we try to perform some operation on ...



This post first appeared on Java Code Geeks, please read the originial post: here

Share the post

Optional orElse vs orElseGet

×

Subscribe to Java Code Geeks

Get updates delivered right to your inbox!

Thank you for your subscription

×