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

What is the output?

2 / 20

What is the output?

3 / 20

Which of the following code segments will correctly find the index of the first string in ArrayList words that starts with the letter "B"? If no such string exists, it should return -1.

4 / 20

What is the output?

5 / 20

Question

6 / 20

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

7 / 20

What is the output ?

8 / 20

What is the output ?

(double) 3/4

9 / 20

What is the result of the following expression in Java?

10 / 20

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

11 / 20

What is the output?

12 / 20

A programmer is designing a program to catalog all books in a library. He plans to have a Book class that stores features of each book: author, title, isOnShelf and so on, with operations like getAuthor, getTitle, getShelfInfo, and
setShelfInfo. Another class, LibraryList, will store an array of Book objects. The LibraryList class will include operations such as listAllBooks, addBook, removeBook, and searchForBook. The programmer plans to implement and test the Book class first, before implementing the LibraryList class. The programmer's plan to write the Book class first is an example of

13 / 20

What is the output?

14 / 20

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

15 / 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.

16 / 20

Refer to the code:

Consider the implementation of a writeDeck method that is added to the Deck class.

17 / 20

Question

18 / 20

What is the best explanation for why digital data is represented in computers in binary?

19 / 20

Question

20 / 20

What is the output?

Your score is

0%

Scroll to Top