String str = "hello";
//Java 8
HashSet<Character> vowels = new HashSet<>(Arrays.asList('a', 'e', 'i', 'o', 'u'));
//Java 9+
Set<Character> vowels = Set.of('a', 'e', 'i', 'o', 'u');
for(char c : str) if(vowels.contains(c)) System.out.println(c + "");