The Program given below checks and helps the understanding of while loops in Java programming.
The Program given below checks and helps the understanding of while loops in Java programming.
public class Example13 {
public static void main(String[] args) throws Exception {
int a = 30;
while (a) {
System.out.print("value:" + a--);
}
}
}
What would be the output after executing given above code :(1)
'While' statement should contain a 'Boolean' value ,'condition' or 'expression' , whose outcome must be of type Boolean.