public class ForTest {
public static void main(String[] args) {
int[] arrar = {1,2,3};
for ( foo ) {
}
}
}
Which three are valid replacements for foo so that the program will compiled and run?
A.
int i: array
B.
int i = 0; i < 1; i++
C.
;;
D.
; i < 1; i++
E.
; i < 1;
A, when arrar is a typo
B, alright
C, posssible but not logical
D, i is unknown, when i was declared it would be valid
E, i is unknown, when i was declared it would be valid
Option A you should change array to arrar