What is the result of the following?
String[] s = new String[] { "A", "B", "C" }; String[] times = new String[] { "Day", "Night" }; for (int i = 0, j = 0; i < s.length && j < times.length; i++, j++) { System.out.print(s[i] + " " + times[j] + "-"); }
B.
This code is correct.
It initializes two variables and uses both variables in the condition check and the update statements.
Since it checks the size of both arrays correctly, it prints the first two sets of elements, and Option B is correct.