What elements does the data array contain after the following
statements?
double[] data = new double[10]; for (int i = 0; i < data.length; i++) data[i] = i * i;
What do the following program segments print? Or, if there is an
error, describe the error and specify whether it is detected at
compile-time or at run-time.
double[] a = new double[10];
System.out.println(a[0]);
double[] b = new double[10];
System.out.println(b[10]);