Write a function that will add the contents of a String array.
1. This time the input array to your function will be an array of Strings.
2. Your function body will be similar except you’ll have to convert each String
to a double number.
public class SumVals2 {
String aryVals[];
double result;
/* Add code here to instantiate an array of String that can hold 8
elements */
/* Next add code like the line below to add 4 elements to the array */
aryVals[0] = “5.25”;
result = sumStrAry(aryVals, 2);
System.out.println(“Result 1: “ + result);
/* Add code here to instantiate 2 more String objects and add them to
the array */
result = sumStrAry(aryVals, 4);
System.out.println(“Result 2: “ + result); } /* Add your function here! */
}