Computer Science, asked by tanishagupta122004, 3 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?​

Answers

Answered by sujalchoudhari21
1

Answer:

the loop will be executed 2×3 i.e 6 times

1-10 is the Range

Explanation:

please use indentation!!!

Similar questions