Java Utililty Methods Array Contain

List of utility methods to do Array Contain

Description

The list of methods to do Array Contain are organized into topic(s).

Method

booleanarrayContainsString(String[] arr, String str, boolean isCaseSensitive)
check if a string is included in the array index numbers follow the convention of substring
boolean found = false;
if (arr != null)
    for (int i = 0; i < arr.length && !found; i++) {
        if (arr[i].equals(str) || (!isCaseSensitive && arr[i].equalsIgnoreCase(str)))
            found = true;
return found;
booleanarrayContainString(String[] arrayString, String str)
array Contain String
if (arrayString == null || arrayString.length == 0) {
    return false;
for (int i = 0; i < arrayString.length; i++) {
    if (arrayString[i].equals(str))
        return true;
return false;
...
booleanarrayIntContainsInt(int[] arrayInt, int value)
savoir si un tableau d'entier contient un entier
for (int i = 0; i < arrayInt.length; i++)
    if (arrayInt[i] == value)
        return true;
return false;