class Main {
public static void main(String[] args) {
String s = "programming";
// count the vowels functionally
long vowels = s.chars().filter(c -> "aeiou".indexOf(c) >= 0).count();
System.out.println(vowels);
}
}chars() gives an IntStream