WorksheetsPractice for 10th AP Java quiz (old)
Total questions: 11
Worksheet time: 8mins
What is the output of this program?
1
2
4
ArrayIndexOutOfBoundsException
What is the output of this program?
2
3
4
ArrayIndexOutOfBoundsException
What is the output of this program?
2
3
4
ArrayIndexOutOfBoundsException
What is the output of this program?
2
3
4
ArrayIndexOutOfBoundsException
Which of the functions is a correct recursive factorial function?
A only
B only
C only
A, B and C
Which call to mystery would cause infinite recursion?
mystery(1,2)
mystery(2,2)
mystery(3,2)
none of these would cause infinite recursion
Which of the functions is a correct recursive triangular number function?
A only
B only
C only
A, B and C
What is returned by the call mystery(1,1)?
5
6
7
Stack Overflow
What is returned by the call mystery(3)?
zy
zyz
yzy
zyyzy
What is returned by the call mystery(3,3)?
5
6
7
Stack Overflow
Which best matches contents of aRay after the following program has executed?
A
B
C
None of these matches
