What is the result? Given: What is the result? Given: What is the result? A. 7 8 9 B. 0 1 2 C. 6 8 10 D. Compilation fails E. 6 7 8 Explanation: Show Hint ← Previous question Next question →
Ryan The question is… public class MyFor1 { public static void main (String[] args) { int[] x = {6,7,8}; for (int i : x) { System.out.print(i + ” “); i++; } } } and the answer is.. E Reply
The question is…
public class MyFor1 {
public static void main (String[] args) {
int[] x = {6,7,8};
for (int i : x) {
System.out.print(i + ” “);
i++;
}
}
}
and the answer is..
E