0%
0 votes, 0 avg
28

This quiz randomly generates 20 questions as asked in AP Computer Science A (AP CSA) - Programming in Java.

Congratulations!

(AP CSA) - Programming in Java

AP Computer Science A (AP CSA) - Programming in Java

This quiz randomly generates 20 questions (in 30 mins) as asked in AP Computer Science A (AP CSA) - Programming in Java.

1 / 20

Which of the following expressions is equivalent to !(x < 5 && y >= 10)?

2 / 20

What is the output?

3 / 20

What is the output?

 

4 / 20

What is the length of the myIntegers array initialized in the code below?
int a = 8;
a *= 2;
a = a * 3 / 5;
int[] myArray = new int[a];
for(int i = 0; i < myArray.length; i++) {
myArray[i] = i % 4;
}

5 / 20

What is the output?

6 / 20

Variable x of a double type can be to the nearest integer using which statement?

7 / 20

What is the output?

8 / 20

Which statement is true about the switch statement?

9 / 20

What output will be produced by invoking secondTestMethod for a Tester object, assuming that testArray contains 3, 4, 5?

10 / 20

What is the output?

11 / 20

Consider the following code segment. What will be printed?

12 / 20

What is the output?

13 / 20

Which of the following are true about arrays?
I. All of the elements inside of an array must be of the same type or related types.
II. When creating an array with the keyword new, booleans are initialized to True.
III. The first element of an array is located at the index of 1.

14 / 20

Question

The relationship between the PlayerGroup and Player classes is an example of:

15 / 20

In Java, Which of the following data types would NOT be considered a primitive data type?

16 / 20

What is the output?

17 / 20

What value is stored in result if

18 / 20

The +=, -=, *=, /=, and %= operators are known as _______ operators.

19 / 20

Which three pieces of code, when inserted independently, set the value of amount to 100?

20 / 20

Question

Your score is

0%

Scroll to Top