Here you can find the source of inArray(String arg, String[] array)
public static boolean inArray(String arg, String[] array)
//package com.java2s; //License from project: Open Source License public class Main { /** check if a string is in an array of strings, checking all elements */ public static boolean inArray(String arg, String[] array) { int i, len; boolean res = false; len = array.length;/*from ww w. ja v a2 s . co m*/ if (len > 0) for (i = 0; i < len; i++) { if (arg.equals(array[i])) res = true; } return res; } }