Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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.

Subtopic: Arrays Clear filter

Questions 231–240 of 300
  1. 231
  2. 232
  3. 233
  4. 234
  5. 235
  6. 236
  7. 237
  8. 238
  9. 239
  10. 240

Question 231

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 232

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 233

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 234

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 235

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 236

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 237

Multiple choice Arrays
What happens? final int[] a={1,2};…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 238

Multiple choice Arrays
What is printed? int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 239

Multiple choice Arrays
Which replacements correctly count values divisible by 3 in every…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 240

Multiple choice Arrays
For an array of length at least 3, which statement is always…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 231 of 300
Page 24 of 30