I have to create 15 question where only 10 will be display randomly.(10 array over 15 array)I need to make sure that there is no duplication of array during the random process. please help me with this. thank you and make it simple as possible.
Public static void main(String() args){ String question_1 = question_One(); //to question 15 String question_15 = question_fifteen(); String [] question = new String [14]; question[0] = question_1; question[1] = question_2; //to question 15 question[14] = question_15; int random = (int) (Math.random()*11); System.out.print(question[random]); }
I still a beginner in Java programming
Aucun commentaire:
Enregistrer un commentaire