हिंदी

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++) - Computer Applications

Advertisements
Advertisements

प्रश्न

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 ? 

एक पंक्ति में उत्तर

उत्तर

(i) 6 times.
(ii) range between 0 and 10.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2013-2014 (March) Set 1
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×
Our website is made possible by ad-free subscriptions or displaying online advertisements to our visitors.
If you don't like ads you can support us by buying an ad-free subscription or please consider supporting us by disabling your ad blocker. Thank you.