Q. What is the output of the below Java program with arrays?
Code:String[] colors = {"RED";"YELLOW";"WHITE"};
System.out.print(colors[2]);
β
Correct Answer: (D)
Compiler error
String[] colors = {"RED";"YELLOW";"WHITE"};
System.out.print(colors[2]);
You must be Logged in to update hint/solution