Question
What would be the result of attempting to compile and run the following code?
public class HelloWorld{
public static void main(String[] args){
double[] x = new double[]{1, 2, 3};
System.out.println("Value is " + x[1]);
}
}
public class HelloWorld{
public static void main(String[] args){
double[] x = new double[]{1, 2, 3};
System.out.println("Value is " + x[1]);
}
}
Answer: Option D
Submit Your Solution Below and Earn Points !
Submit Your Solution Below and Earn Points !
Submit Solution