DEV Community

Sivaram Rasathurai
Sivaram Rasathurai

Posted on

Answer: Best way to check for null values in Java? How many time you have written null check

Generic Method to handle Null Values in Java

  1. If that object is not null we are going to do the following things.

    a. We can mutate the object (I)

    b. We can return something(O) as output instead of mutating the object (I)

    c. we can do both

In this case…

Top comments (0)