Question: Given the following Java program fragment, Random rand = new Random ( ) ; for ( int i = 0 ; i 6 ; i

Given the following Java program fragment,
Random rand = new Random () ;
for (int i=0;i6; i++)
System.out.print (rand. nextInt(10)-5+"");
which of the following can be considered as not possible output after executing the above Java program fragment?
II.420-2,-2,-3,3
Select one:
I only.
none of them
II only.
I and III.
II and III.
I, II and III.
I and II.
III only.
Given the following Java program fragment, Random

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!