Define and implement a generic static method hasNull that returns true if an input array has null element and false otherwise.
Generic methods
Check for null
Report a typo
Sample Input 1:
String
There are elements of the arraySample Output 1:
falseWrite 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
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.