I'm doing a null pointer check and would like to know if there is any better way in java 8 other than optional feature
if (cake != null && cake.frosting != null && cake.frosting.berries != null) {
//Do something
}
I'm looking if there is any in-line null pointer check