Here you can find the source of searchInStringArray(String key, String[] data)
public static boolean searchInStringArray(String key, String[] data)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static boolean searchInStringArray(String key, String[] data) { Set<String> values = new HashSet<String>(Arrays.asList(data)); return values.contains(key); }//from w w w . j a v a2 s.c o m }