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,061–2,070 of 2,811
  1. 2061
  2. 2062
  3. 2063
  4. 2064
  5. 2065
  6. 2066
  7. 2067
  8. 2068
  9. 2069
  10. 2070

Question 2061

Multiple choice Unit 4: Data Collections
Which initializes an int array with four zero elements? I: int[] arr={0,0,0,0};…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2062

Multiple choice Unit 4: Data Collections
Assume location has been declared. The segment should locate the first negative…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2063

Multiple choice Unit 4: Data Collections
What occurs for a nonempty int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2064

Multiple choice Unit 4: Data Collections
arr1 initially contains [0,6,0,4,0,0,2]. What does…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2065

Multiple choice Unit 4: Data Collections
Assume k≥2 and arr.length>k. What is the maximum…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2066

Multiple choice Unit 4: Data Collections
What will be output from the following code segment, assuming it is in the same class as the doSomething method? int[] arr = {1, 2, 3, 4}; doSomething(arr);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2067

Multiple choice Unit 4: Data Collections
A program reads an unknown number of text-file…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2068

Multiple choice Unit 4: Data Collections
For intensive calculations over a fixed-size list of numeric values,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2069

Multiple choice Unit 4: Data Collections
Assume every list element is a nonnull Address. Which statement in the enhanced loop prints each name? public class Address { private String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2070

Multiple choice Unit 4: Data Collections
Every element of Address[] list is nonnull. Address has no overridden toString. Which replacement prints each full mailing address using the accessors? I uses…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,061 of 2,811
Page 207 of 282