Check for null

Report a typo

Define and implement a generic static method hasNull that returns true if an input array has null element and false otherwise.

Sample Input 1:

String
There are elements of the array

Sample Output 1:

false
Write a program in Java 17
// do not remove imports
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.function.Function;

class ArrayUtils {
// define hasNull method here
}
___

Create a free account to access the full topic