Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions unit by unit, then check each answer against a worked solution.

Free · no sign-up Open questions need no account. Sign up or log in to open the rest.

Questions 2,071–2,080 of 2,811
  1. 2071
  2. 2072
  3. 2073
  4. 2074
  5. 2075
  6. 2076
  7. 2077
  8. 2078
  9. 2079
  10. 2080

Question 2071

Multiple choice Unit 4: Data Collections
All Student entries and their Address fields are nonnull. Which statement in the loop prints each student’s name? public class Address { private String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2072

Multiple choice Unit 4: Data Collections
For a nonempty Student array of nonnull entries, which locate bodies always return a student with maximum idNum? public class Address { private String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2073

Multiple choice Unit 4: Data Collections
Which replaces /* more code */ in the constructor to initialize tickList? public class Ticket { private String row private int seat private double price public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2074

Multiple choice Unit 4: Data Collections
Which replaces /* code to calculate amount */ in totalPaid, after all ticket entries are initialized? public class Ticket { private String row private int seat…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2075

Multiple choice Unit 4: Data Collections
There are NUMSALES transactions. Which declares an array suitable for storing them? public class Ticket { private String row private int seat private double…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2076

Multiple choice Unit 4: Data Collections
For a nonempty arr with n=arr.length, which modification makes the minimum-finding segment correct? I: change i=1 to i=0…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2077

Multiple choice Unit 4: Data Collections
bookList contains distinct nonnull Book objects. What does the enhanced-for loop do? public class Book { private String title,author private boolean…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2078

Multiple choice Unit 4: Data Collections
A bingo game needs one BingoCard reference for each of NUMPLAYERS players. Which declares the array? public class BingoCard…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2079

Multiple choice Unit 4: Data Collections
players has been allocated as a BingoCard array but its entries are null. Which constructs and stores each card? public class BingoCard { private int[] card…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2080

Multiple choice Unit 4: Data Collections
Which statement causes a type error? ArrayList strList=new…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,071 of 2,811
Page 208 of 282