What is the output of the following program
class TestApp {
public static void main(String[] args) {
for (int index = 0; 1; index++) {
System.out.println("Welcome");
break;
}
}
}
Select one:
A. Welcome
B. Type mismatch error
C. Run infinite-times
D. Welcome Welcome
B. Type mismatch error
for(initializer; condition; iterator)
The condition is a boolean expression
Comments
Leave a comment