Java tutorial
//package com.java2s; import java.util.List; public class Main { public static boolean judge(List<String> list, String dir) { boolean result = false; for (int i = 0; i < list.size(); i++) { if (list.get(i).equals(dir)) { result = true; return result; } } return result; } }