Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
    }
}