Here you can find the source of inArray(String string, String[] strings)
public static boolean inArray(String string, String[] strings)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean inArray(String string, String[] strings) { if (string == null) { return false; }//from w w w.ja va2s . c o m for (String s : strings) { if (s != null && s.equalsIgnoreCase(string)) { return true; } } return false; } public static boolean inArray(int i, int[] array) { for (int j : array) { if (j == i) { return true; } } return false; } }