Here you can find the source of arrayContains(Object[] a, Object ob)
public static int arrayContains(Object[] a, Object ob)
//package com.java2s; /* //from ww w . j av a 2s . c om GeoGebra - Dynamic Mathematics for Everyone http://www.geogebra.org This file is part of GeoGebra. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. */ public class Main { /** * Returns the index of ob in array a * @return -1 if ob is not in a */ public static int arrayContains(Object[] a, Object ob) { if (a == null) return -1; for (int i = 0; i < a.length; i++) { if (a[i] == ob) return i; } return -1; } }