vendredi 18 décembre 2015

generate random array array of size N which only contains 0 and 1

I want to generate random array of size N which only contains 0 and 1.please help me. i write this code:

for(int j=0;j<N;++j) 
int a[] = new int[1];
a[0]=rand.nextInt(getMigratableVms(host).size());




Aucun commentaire:

Enregistrer un commentaire