As you know, java.util.Objects is
This class consists of static utility methods for operating on objects.
One of such methods i
should use object == null over Objects.isNull() in a if statement?
If you look at the source code of IsNull
method,
/* Returns true if the provided reference is null otherwise returns false.*/
public static boolean isNull(Object obj) {
return obj == null;
}
It is the same. There is no difference. So you can use it safely.