New course! Every coder should learn Generative AI!
Try a free lesson+ 1
How to Remove vowels from a word in java
2 Answers
+ 9
str = str.toLowerCase().replaceAll("[aeiou]", "");
+ 3
if you want to keep the original string:
str = str.replaceAll("[aeiouAEIOU]", "");