Java tutorial
//package com.java2s; import java.util.ArrayList; public class Main { /**** Check if the value is exist in the list ****/ public static boolean isExistInList(ArrayList<String> list, String value) { if (list == null) return false; for (int i = 0; i < list.size(); i++) { if (list.get(i).equals(value)) { return true; } } return false; } }