Which of the following can fill in the blank to have the code compile successfully?
package nyc; public class Main { public static void main(String... args) { String[] s = new String[] { "A", "B", "C" }; String[] times = new String[] { "Day", "Night" }; for ( i < 1; i++, j++) System.out.println(s[i] + " " + times[j]); } }
B.
In a for loop, the type is only allowed to be specified once.
A comma separates multiple variables since they are part of the same statement.
Option B is correct.