java program to delete vowels in a given string

Solutions on MaxInterview for java program to delete vowels in a given string by the best coders in the world

showing results for - "java program to delete vowels in a given string"
Andrea
06 Jan 2019
1// Java program to delete vowels in a given string
2import java.util.*;
3public class RemoveVowelsInString
4{
5   public static void main(String[] args)
6   {
7      String str = "Deekshit Prasad";
8      System.out.println("Given string: " + str);
9      str = str.replaceAll("[AaEeIiOoUu]", "");
10      System.out.println("After deleting vowels in given a string: " + str);
11   }
12}