84.51° Interview Question

Write a simple Java code to remove all vowels from a string.

Interview Answer

Anonymous

Oct 14, 2016

public class RemoveVowels { public static void main(String[] args) { String str = "RemoveVowels"; String output = str.replaceAll("[aeiouAEIOU]", ""); System.out.println(output); } }