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 is the output of the code below?
double[] array = new double[4];
int increment = 1;
for (double a: array){
System.out.println(a + increment);
increment += 2;
}

2 / 20

What value is stored in result if

3 / 20

Question

4 / 20

What is the output?

5 / 20

Which statement is true about the switch statement?

6 / 20

What is the result of the following expression if x = 5 and y = 10?

!(x > 0 || y < 10) && (x + y == 15)

7 / 20

What is the output ?

8 / 20

Question

9 / 20

What is the output?

10 / 20

Which statement about parameters is false?

11 / 20

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

12 / 20

Which of the following is true about arithmetic operations?
I. An arithmetic operation that uses two integer values will evaluate to an integer value.
II. It is impossible to add 1 to a variable without ever using the number 1 in a statement.
III. An arithmetic operation that uses a double value will evaluate to a double value.

13 / 20

Question

14 / 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

15 / 20

In a class Product, which of the following is the most common and correct usage of the this keyword?

16 / 20

Question

17 / 20

Which of the following is the output of the code below?
String myString = {"Hello", "World", "!"};
int i = 3;
while (i > 0) {
System.out.print(myString[i]);
System.out.print(" ");
i--;
}

18 / 20

Which of the following data types would best represent a student ID number that may have leading zeroes that must be included in the value?

19 / 20

8 bits is enough to represent 256 different numbers. How many total bits do you need to represent 512 (twice as many) numbers?

20 / 20

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

Your score is

0%

Scroll to Top