I find myself constantly writing this statement
MyObject myObject = something.getThatObject();
if( myObject !=null &&
myObject .someBooleanFunction()){
}
in order to prevent a null pointer exception. Is there a shortcut to this in Java? I'm thinking like myObject..someBooleanFunction()
?