java program to remove vowels

import java.util.Scanner;

public class JavaProgram
{
public static void main(String args[])
{
String strOrig, strNew;
Scanner scan = new Scanner(System.in);

System.out.print("Enter a String : ");
strOrig = scan.nextLine();

System.out.print("Removing Vowels from The String [" +strOrig+ "]\n");
strNew = strOrig.replaceAll("[aeiouAEIOU]", "");

System.out.print("All Vowels Removed Successfully..!!\nNow the String is :\n");

System.out.print(strNew);
}
}


import java.util.Scanner;

public class JavaProgram
{
public static void main(String args[])
{
String str, r;
Scanner scan = new Scanner(System.in);

System.out.print("Enter a String : ");
str = scan.nextLine();

System.out.print("Removing Vowels from String [" +str+ "]\n");
r = removeVowels(str);

System.out.print("Vowels Removed from the Entered String Successfully..!!\nNow the String is :\n");
System.out.print(r);
}

private static String removeVowels(String s)
{
String finalString = "";
int i;

for(i=0; i

Comments

Popular posts from this blog

தட்டு வண்டியில் காளிக்கோயில் - சிறுகதை

பிரேமாவின் பெண் குழந்தை

தீபம் பிளக்ஸ்