diff --git a/RemoveVowelsFromString.java b/RemoveVowelsFromString.java new file mode 100644 index 0000000..f20a536 --- /dev/null +++ b/RemoveVowelsFromString.java @@ -0,0 +1,19 @@ +import java.util.Scanner; + +public class RemoveVowelsFromString +{ + public static void main(String args[]) + { + String s1, s2; + Scanner scan = new Scanner(System.in); + + System.out.print("Enter a String : "); + s1 = scan.nextLine(); + + s2 = s1.replaceAll("[aeiouAEIOU]", ""); + + System.out.print("All Vowels Removed Successfully..!!"); + + System.out.print(s2); + } +} \ No newline at end of file