mardi 17 mai 2016

How to generate a random char array of a specific length using specific characters

I am trying to take this char array here:

char[] options = {'F','Z','P','E','N','T','L','C','D','O'};

and generate a new random char array of a specific length. Like this:

char[] results ={'Z','E','L','C'...} all the way up to a length of 70 characters long. I've already tried to create a new char such as char[] results = new char[70] and then using a for loop to try to get this. But for some reason my mind is blanking. Can anybody refresh me? Thanks all




Aucun commentaire:

Enregistrer un commentaire