I use object != null a lot to avoid NullPointerException.

What is an alternative to:

if (someobject != null) {
    someobject.doCalc();
}

6
65

Leave a Reply

Your email address will not be published. Required fields are marked *