Answers for "Write a program with a user-defined function with string as a parameter which replaces all vowels in the string with ‘*’."

4

Java program to delete vowels in a given string

// Java program to delete vowels in a given string
import java.util.*;
public class RemoveVowelsInString
{
   public static void main(String[] args)
   {
      String str = "Deekshit Prasad";
      System.out.println("Given string: " + str);
      str = str.replaceAll("[AaEeIiOoUu]", "");
      System.out.println("After deleting vowels in given a string: " + str);
   }
}
Posted by: Guest on November-05-2020

Code answers related to "Write a program with a user-defined function with string as a parameter which replaces all vowels in the string with ‘*’."

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language