Avoiding NullPointerException in Java
I use object != null
a lot to avoid NullPointerException
.
What is an alternative to:
if (someobject != null) {
someobject.doCalc();
}
I use object != null
a lot to avoid NullPointerException
.
What is an alternative to:
if (someobject != null) {
someobject.doCalc();
}