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 771–780 of 3,140
  1. 771
  2. 772
  3. 773
  4. 774
  5. 775
  6. 776
  7. 777
  8. 778
  9. 779
  10. 780

Question 771

Multiple choice Unit 1: Using Objects and Methods
What is printed as a result of executing the following code segment? String a =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 772

Multiple choice Unit 1: Using Objects and Methods
What is printed as a result of executing the following code segment? String a = "apple", b = "banana";…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 773

Multiple choice Unit 1: Using Objects and Methods
What is printed as a result of executing the following code segment? String s = "Education"; int v = 0; for (int i…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 774

Multiple choice Unit 1: Using Objects and Methods
What is printed as a result of executing the following code segment? String s = "mathematics"; String out = ""; for (int i =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 775

Multiple choice Unit 1: Using Objects and Methods
What is printed as a result of executing the following code segment? String s = "ab cd ef"; String r = ""; int i = 0;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 776

Multiple choice Unit 1: Using Objects and Methods
What is printed as a result of executing the following code segment? String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 777

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. Assume num is a properly declared and initialized int variable. if (num > 0) { if (num % 2 == 0) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 778

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. int num = /* initial value not shown */; boolean bl = true; if (num > 0) { if (num >= 100) { bl = false; } } else {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 779

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 780

Multiple choice Unit 2: Selection and Iteration
Assume that a, b, and c are boolean variables that have been properly declared and…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 771 of 3,140
Page 78 of 314