Advertisements
Advertisements
प्रश्न
Some of the code given below contains errors. Identify the error and correct it. Write the output of the correct/corrected code.
int YM[] = { 512, 312, 452, 652, 782};
boolean all = true;
for(int j = 0; j <5; j++)
{
if(YM[j]%10 !=2)
{
all = false;
}
}
System.out.print(" ALL =" + all);
अति संक्षिप्त उत्तर
Advertisements
उत्तर
No Error. Output : ALL = true
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 7: Arrays - One Dimension - Exercises [पृष्ठ १७५]
