How many lines does the following code output?
String[] days = new String[] { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; for (int i = 0; i < days.length; i++) System.out.println(days[i]);
B.
There is nothing wrong with this code.
It correctly creates a seven-element array.
The loop starts with index 0 and ends with index 6.
Each line is correctly output.
Therefore, Option B is correct.