A
Q. What is the output of the below Java program with a decrement operator and WHILE-loop?
Code:
int a=4;
while(a>0)
{
System.out.print(a + " ");
a--;
}
while(a>0)
{
System.out.print(a + " ");
a--;
}
- Correct Answer - Option(A)
- Views: 7
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.