Tag: nullpointerexception

50 votes
30 answers
2.6K views
Avoiding NullPointerException in Java

I use object != null a lot to avoid NullPointerException. What is an alternative to: if (someobject != null) {

avatar
Serina
0 1 0 9
asked 07 September, 2021