Here you can find the source of arrayContains(int[] array, int value)
public static boolean arrayContains(int[] array, int value)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean arrayContains(int[] array, int value) { for (int i : array) { if (i == value) { return true; }/*from ww w .ja v a 2 s . co m*/ } return false; } public static boolean arrayContains(String[] array, String value) { for (String i : array) { if (i.equals(value)) { return true; } } return false; } public static boolean arrayContains(Object[] array, Object value) { for (Object i : array) { if (i != null && i.equals(value)) { return true; } } return false; } }