Here you can find the source of arrayContains(int[] array, int value)
public static int arrayContains(int[] array, int value)
//package com.java2s; //License from project: Open Source License public class Main { public static int arrayContains(int[] array, int value) { int index = 0; for (; index < array.length; index++) if (array[index] == value) break; if (index < array.length) return index; else/* w ww. j ava 2 s . c o m*/ return -1; } }