One liner to check if element is in the list May 9, 2023 by Tarik Use Arrays.asList: if( Arrays.asList("a","b","c").contains("a") )