8. What is the return type of the method in the accompanying figure? a. c. b. d.
ID: 3762082 • Letter: 8
Question
8.
What is the return type of the method in the accompanying figure?
a.
c.
b.
d.
9.
Which of the following is a valid call to the method in the accompanying figure?
a.
b.
c.
d.
10.
Based on the code in the accompanying figure, what would be the output of the following statement?
System.out.println(secret(5, 7.0));
a.
b.
c.
d.
public int mystery(int x, int y)
{
if (x >= y)
return x - y;
else
return x + y;
}
11.
Based on the code in the accompanying figure, what would be the output of the following statement?
System.out.println(mystery(8,7));
a.
b.
c.
d.
int[] numList = new int[50];
for (int i = 0; i < 50; i++)
numList[i] = 2 * i;
num[10] = -20;
num[30] = 8;
8.
What is the return type of the method in the accompanying figure?
a.
publicc.
voidb.
intd.
double ABCD9.
Which of the following is a valid call to the method in the accompanying figure?
a.
secret(5, 4.8);b.
secret(int 5, double 4.8);c.
secret(int x, double y);d.
public static int secret(5, 4.8); ABCD10.
Based on the code in the accompanying figure, what would be the output of the following statement?
System.out.println(secret(5, 7.0));
a.
5.0b.
7.0c.
2.0d.
35.0public int mystery(int x, int y)
{
if (x >= y)
return x - y;
else
return x + y;
}
11.
Based on the code in the accompanying figure, what would be the output of the following statement?
System.out.println(mystery(8,7));
a.
1b.
7c.
8d.
15int[] numList = new int[50];
for (int i = 0; i < 50; i++)
numList[i] = 2 * i;
num[10] = -20;
num[30] = 8;
Explanation / Answer
8.
Figure is not given
9.
a.
secret(5, 4.8);
Other options has data types mentioned while invoking functions, which is not valid
10.
Code of secret is not mentioned
11.
a. 1 ( 8 - 7 since 8 is greater than 7)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.