Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Practice Questions

Work through AP Computer Science A practice questions on Data Collections, 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 761–770 of 1,222
  1. 761
  2. 762
  3. 763
  4. 764
  5. 765
  6. 766
  7. 767
  8. 768
  9. 769
  10. 770

Question 761

Free response Arrays
Book objects are ordered alphabetically by title, then by publication year. Each input shelf is sorted and individually duplicate-free. A book with the same…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 762

Free response 2D Arrays
In chess, a queen can move vertically, horizontally, and diagonally on an 8-by-8 chessboard. The picture below shows all the positions on the board that a queen…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 763

Free response Arraylists
The Gizmo class represents gadgets that people purchase. Some Gizmo objects are electronic and others are not. A partial definition of the Gizmo class is shown…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 764

Multiple choice Arrays
Two vertical lines at indices left and right enclose area(right−left)×min(height[left],height[right]). Return the greatest area; heights are nonnegative,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 765

Free response 2D Arrays
SmartParkingSimulator uses a rectangular boolean matrix: true means occupied, false available. Choose the first row from top to bottom with any vacancy; within…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 766

Free response Arraylists
Shipment stores destination, weight in kilograms and fragile status. ShipmentTracker maintains an ArrayList . Do not use Map or HashMap for grouping. public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 767

Multiple choice Using Text Files
Which class is commonly used…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 768

Multiple choice Using Text Files
Which import statement is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 769

Multiple choice Using Text Files
Which Scanner method…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 770

Multiple choice Using Text Files
What does…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 761 of 1,222
Page 77 of 123