Question:What will be the output of the following code?
public class MyTest {

    public static void main(String[] args) {
        for (int i=0; i > 10; i+=2) {
            System.out.println(i);
        }
    }
}
 

A Nothing will It will print the following output: 0 2 4 6 8be printed. 

B It will print the following output: 0 2 4 6 8 

C Compile time error 

D It will print the following output: 0 1 2 3 4 5 6 7 8 9 

+ Answer
+ Report
Total Preview: 974

Copyright © 2024. Powered by Intellect Software Ltd