Which of the following is equivalent to this code snippet given an array of String objects?
for (int i=0; i<s.length; i++) System.out.println(s[i]);
Click to view the answer
B.
The for-each loop uses a variable and colon as the syntax, making Option B correct.