Answers for "how to check array if it is numeric or string java"

1

check if array contains a number in java

public static boolean contains(final int[] arr, final int key) {
    return Arrays.stream(arr).anyMatch(i -> i == key);
}
Posted by: Guest on May-24-2021

Code answers related to "how to check array if it is numeric or string java"

Browse Popular Code Answers by Language