1.
Q1: Assume the following declarations:
String [] alpha;
alpha = new String[4];
Evaluate these statements:
alpha[0] = "apple";
alpha[1] = "Banana";
alpha[2] = alpha[0].substring(2);
alpha[3] = alpha[alpha[1].indexOf('n')];
Give the contents of array
alpha
after the execution of the above statements:alpha[0] =
“”alpha[1] =
“”alpha[2] =
“”alpha[3] =
“”