NEW
Font size
WorksheetsAP Java 9-15-2023 (just functions1)
Total questions: 10
Worksheet time: 11mins
Which of the following replacements for /* missing code */ would correctly complete the function?
A only
B only
Both A and B
Neither A nor B
Which of the following replacements for /* missing code */ would correctly complete the function?
answer = number1 * number2;
double answer = number1 + number2;
int answer = number1 * number2;
None of these
Which of the following replacements for /* missing code */ would correctly complete the function?
a + b + c;
return int answer = a + b + c;
return double answer = a + b + c;
return a + b + c;
Which of the following replacements for /* missing code */ would correctly complete the function?
return a + b + c/2;
return a + b + c/3;
return (a + b + c)/2;
return (a + b + c)/3;
Which of the following replacements for /* missing code */ would correctly complete the function?
return num1 / num2;
return num1 % num2;
return num2 % num1;
return num2 / num1;
Which of the following replacements for /* missing code */ would correctly complete the function?
A
B
C
D
Which of the following replacements for /* missing code */ would correctly complete the function?
A only
B only
Both A and B
Neither A nor B
Which of the following replacements for /* missing code */ would correctly complete the function?
A only
B only
Both A and B
Neither A nor B
Which of the following replacements for /* missing code */ would correctly complete the function?
A only
B only
Both A and B
Neither A nor B
Which of the following replacements for /* missing code */ would correctly complete the function?
n >= num
n <= num
num >= n
num <= n
