Consider the method headings void funcOne(int[] alpha, int size) int funcSum(int
ID: 3650473 • Letter: C
Question
Consider the method headingsvoid funcOne(int[] alpha, int size)
int funcSum(int x, int y)
void funcTwo(int[] alpha, int[] beta)
and the declarations
int[] list = new int[50];
int[] AList = new int[60];
int num;
Write Java statements that do the following:
a. Call the method funcOne with the actual parameters, list and 50,
respectively.
b. Print the value returned by the method funcSum with the actual
parameters, 50 and the fourth element of list, respectively.
c. Print the value returned by the method funcSum with the actual
parameters, the thirtieth and tenth elements of list, respectively.
d. Call the method funcTwo with the actual parameters, list and AList,
respectively.
Explanation / Answer
please rate - thanks
void funcOne(int[] alpha, int size)
int funcSum(int x, int y)
void funcTwo(int[] alpha, int[] beta)
and the declarations
int[] list = new int[50];
int[] AList = new int[60];
int num;
Write Java statements that do the following:
remember arrays start at index 0, so the 10th element is actually element 9
a. Call the method funcOne with the actual parameters, list and 50,
respectively.
funcOne(list,50);
b. Print the value returned by the method funcSum with the actual
parameters, 50 and the fourth element of list, respectively.
System.out.println(funcSum(50,list[3]));
c. Print the value returned by the method funcSum with the actual
parameters, the thirtieth and tenth elements of list, respectively.
System.out.println(funcSum(list[12],list[9]));
d. Call the method funcTwo with the actual parameters, list and AList,
respectively.
funcTwo(list,Alist);