Java tutorial
//package com.java2s; //License from project: LGPL import java.util.Arrays; import java.util.List; public class Main { private static final List<String> DOCUMENT_EXTENSIONS = Arrays.asList(("doc,docx,odt,rtf").split(",")); private static boolean isDoc(String ext) { for (String s : DOCUMENT_EXTENSIONS) { if (s.equalsIgnoreCase(ext)) return true; } return false; } }