In  this tutorial, we will see “How to check if ‘VOWEL’ is present in a String using Java 8?” check vowel in string using java 8

Java 8 – How to check if VOWEL is present in a String? – Simplest Example Click To Tweet

 

Output:

check vowel in string java 8

In this example, IntStream.range method is used to create a stream of integers from 0 to s.length() - 1, the mapToObj method to map each integer to the corresponding character in the string, and the anyMatch method is there to check if any of the characters are vowels. and Finally, the indexOf method is used to check if a character is a vowel.

skip method java 8 stream

Java 8 – How to check if VOWEL is present in a String? – Simplest Example Click To Tweet

Do you like this Post? – then check my other helpful posts:

Other Useful References: