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 code fragment, when inserted at line 6, enables the code to print true?

2 / 20

What is returned by the call mystery("java")?

3 / 20

Which of the following is the output of the code below?
double[] myArray = new double[3];
myArray[0] = 2.0;
myArray[1] = 4.6;
System.out.println(myArray[1] - myArray[2]);

4 / 20

Question

5 / 20

Which statement about parameters is false?

6 / 20

Question

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

7 / 20

What is the output ?

8 / 20

Consider the following class. Which of the following code segments, if placed in a main method in a different class, would cause a compile-time error?

 

9 / 20

Question

10 / 20

How many times will the word "Hello" be printed?

11 / 20

Question

12 / 20

Which three statements are true about the structure of a Java class? (Choose three.)

13 / 20

Question

14 / 20

What is the output?

15 / 20

For the sample code:

Consider this description of the Deck constructor:

16 / 20

Question

17 / 20

Which of the following is equivalent to !(a && b) where a and b are boolean variables?

18 / 20

ASCII is a character-encoding scheme that uses a numeric value to represent each character. For example, the uppercase letter "G" is represented by the decimal (base 10) value 71. A partial list of characters and their corresponding ASCII values are shown in the table below.
A-65
B-66
C-67
D-68
ASCII characters can also be represented by binary numbers. According to ASCII character encoding, which of the following letters is represented by the 8-bit binary value: 0100 0010

19 / 20

What is the output?

20 / 20

Question

Your score is

0%

Scroll to Top