Java Array Contain arrayContains(String[] array, String str)

Here you can find the source of arrayContains(String[] array, String str)

Description

array Contains

License

Open Source License

Declaration

static public boolean arrayContains(String[] array, String str) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Arrays;

public class Main {
    static public boolean arrayContains(String[] array, String str) {
        return Arrays.asList(array).contains(str);
    }/*w w w .j a  v  a  2 s. com*/

    static public boolean arrayContains(String[] array, char c) {
        return Arrays.asList(array).contains(String.valueOf(c));
    }
}

Related

  1. ArrayContains(Object[] array, Object obj)
  2. arrayContains(Object[] array, Object object)
  3. arrayContains(Object[] element, Object[][] array)
  4. arrayContains(Object[] haystack, Object needle)
  5. arrayContains(String[] arr, String sg, boolean ignoreCase)
  6. arrayContains(String[] array, String value)
  7. arrayContains(String[] array, String value)
  8. arrayContains(String[] array, String word)
  9. arrayContains(String[] parent, String[] child)