+ 2

how to print a word letter by letter, and that when a vowel is identified, an asterisk is printed instead of it?

25th Jan 2018, 10:45 PM
Anthony
3 ответов
+ 2
String string = "hello"; string = string.replaceAll("[aeiouAEIOU]", "*"); for(char c : string.toCharArray()){ System.out.println(c); }
25th Jan 2018, 10:55 PM
Jeremy
Jeremy - avatar
+ 1
you could make an array and use an if statement to replace the vowel. what language are you using?
25th Jan 2018, 10:50 PM
Daemo
Daemo - avatar
+ 1
java
25th Jan 2018, 10:51 PM
Anthony