Analyze the following code: public class Test {public static void main(String[] args) {double[] x = {2.5, 3, 4};for (double value: x)System.out.print(value + " ");} }
A. The program has a syntax error because value is undefineD.
B. The program displays 2.5 3.0 4.0
C. The program displays 2.5, 3, 4
D. The program displays 2.5, 3.0 4.0