mercredi 7 janvier 2015

How I get a random set of words which are stored in a string array and substitutes them with something else

I have a string like


This is a very nice sentence


I break it into separate words and stored in String Array with String[] words = s.split(" ") How can I take a specific percentage on the total number of words (lets say 2 of 6 words) and substitute these 2 words with something like ...





Aucun commentaire:

Enregistrer un commentaire