Java tutorial
//package com.java2s; import java.util.Arrays; import java.util.List; public class Main { public static <T> Boolean contains(T[] elements, T elementToFind) { List<T> elementsList = Arrays.asList(elements); return elementsList.contains(elementToFind); } }