0%
0 votes, 0 avg
23

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

Question

The method reduce() is not a public method because

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

4 / 20

Refer to the following code fragment:

5 / 20

Question

6 / 20

What is the output?

Four words become HiHowAreYou, since its length is more than 4, nothing will be removed and HiHowAreYou removed will be printed.

7 / 20

What is the output?

8 / 20

Question

9 / 20

Question

10 / 20

What is the output?

11 / 20

Question

Which of the following is a false statement about the methods?

12 / 20

Question

13 / 20

What is the output?

14 / 20

The boolean expression !A && B || C is equivalent to

15 / 20

What is the output?

16 / 20

Question

17 / 20

For the sample code:

Consider this description of the Deck constructor:

18 / 20

Question

19 / 20

What is the output?

20 / 20

Which code fragment, when inserted at line 6, enables the code to print true?

Your score is

0%

Scroll to Top