Computer Science, asked by yashandvarun, 10 months ago

%.) Study the method and answer the given questions.
public void sampleMethod()
for( int i = 0; i < 3; i++)
for(int j=0; j<2; j++)
int number = (int)(Math.random() * 10);
System.out.println(number);
(i) How many times does the loop execute?
(ii) What is the range of possible values stored in
the variable number?
ICSE 2014​

Answers

Answered by pranavnebhnani
2

Answer:

i) 6 TIMES

II) 0 TO 10

Answered by sumit1202
2

Answer:

  1. the loop will execute 6 times
  2. it can be easily stored in double

Similar questions