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 821–830 of 1,222
  1. 821
  2. 822
  3. 823
  4. 824
  5. 825
  6. 826
  7. 827
  8. 828
  9. 829
  10. 830

Question 821

Multiple choice Arrays
What is printed? String[] a={"A","B"}; String[] b=a; String[] c={a[0],a[1]} String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 822

Multiple choice Arrays
What is v[4] after this code? int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 823

Multiple choice Arrays
What are the final array contents?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 824

Multiple choice Arrays
What are the final array contents?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 825

Multiple choice Arrays
What is printed? int[] a={0,1}; int[] b=a;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 826

Multiple choice Arraylists
Assume java.util.ArrayList is imported. What is printed? ArrayList list=new ArrayList ()…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 827

Multiple choice Arraylists
What is printed? String[] cities={"Atlanta","Boston","Chicago"} for(String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 828

Multiple choice Arraylists
For which category of lists does this method always remove every negative element?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 829

Multiple choice Arraylists
Which replacement makes this an unbiased Fisher–Yates shuffle, assuming Math.random() is uniform? int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 830

Multiple choice Arraylists
Complete rateIsIncreasing so it returns true exactly when every daily gain is positive and gains strictly increase. prices contains at least three finite…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 821 of 1,222
Page 83 of 123