Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice 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 841–850 of 3,140
  1. 841
  2. 842
  3. 843
  4. 844
  5. 845
  6. 846
  7. 847
  8. 848
  9. 849
  10. 850

Question 841

Multiple choice Unit 2: Selection and Iteration
How many times will the word "Heyo!" be printed in the following code segment? int count =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 842

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int num = 8; for(int i = num; i > 0; i -= 3) //Line 2 {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 843

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: for(int j = 0; j < 4; j++) //Line 1 { for(int k = 0; k < j+1; k++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 844

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment: int b = 10; String result = ""; while(b < 100) { result += b; b *=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 845

Multiple choice Unit 2: Selection and Iteration
Which of the following is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 846

Multiple choice Unit 2: Selection and Iteration
What does this Java…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 847

Multiple choice Unit 2: Selection and Iteration
Consider the code snippet below. String name = "Karel"; String checkName = new String("Karel"); boolean nameMatches = name == checkName; Note that we forced…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 848

Multiple choice Unit 2: Selection and Iteration
What is the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 849

Multiple choice Unit 2: Selection and Iteration
Which of the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 850

Multiple choice Unit 2: Selection and Iteration
Why do we use if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 841 of 3,140
Page 85 of 314