samedi 28 mars 2015

How to eliminate Vowels from a string in java?

I want to eliminate vowels from a String, I can eliminate them, but I fail to return them to main(). I got the exact output by using the following code.



String string = "ajeIokluj";
String s = string.replaceAll("[aeiouAEIOU]","");
return s;


It will be great if the required output came by using for loop.


Aucun commentaire:

Enregistrer un commentaire