Question:Which of the following code snippets will generate five random numbers between 0 and 200?
A
Random r = new Random(); for (int i = 0; i < 5; i++) { System.out.println(r.nextInt(0,200)); }B
Random r = new Random(200); for (int i = 0; i < 5; i++) { System.out.println(r.nextInt()); }C
Random r = new Random(); for (int i = 0; i < 5; i++) { System.out.println(r.nextInt(200)); }D
Random r = new Random(200); for (int i = 0; i < 5; i++) { System.out.println(r.nextInt(0)); }
+ AnswerC
+ Report