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 101–110 of 2,811
  1. 101
  2. 102
  3. 103
  4. 104
  5. 105
  6. 106
  7. 107
  8. 108
  9. 109
  10. 110

Question 101

Multiple choice Unit 1: Using Objects and Methods
What is wrong with this method definition? public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 102

Multiple choice Unit 1: Using Objects and Methods
Why do we use methods in Java? I. To make code easier to understand II. To define global variables…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 103

Multiple choice Unit 1: Using Objects and Methods
A coffee shop has created a DrinkOrder class. The class contains variables to represent the following: A String variable called name to represent the name of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 104

Multiple choice Unit 1: Using Objects and Methods
A coffee shop has created a DrinkOrder class. The class contains variables to represent the following: A String variable called name to represent the name of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 105

Multiple choice Unit 1: Using Objects and Methods
After the execution of the following lines of code, what will be output onto the console? String letters = "ABCde"; String name = "Karel the Dog"; String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 106

Multiple choice Unit 1: Using Objects and Methods
Consider the following class: public class Coin { private String name; private double value; public Coin(String theName, double theValue) { name = theName;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 107

Multiple choice Unit 1: Using Objects and Methods
public class Insect { private String name; private int numLegs; private boolean hasWings; private boolean hasExoskeleton; public Insect( String theName, int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 108

Multiple choice Unit 1: Using Objects and Methods
Which of the following code segments would successfully…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 109

Multiple choice Unit 1: Using Objects and Methods
Consider the following class: public class Dog { private String name; private String breed; public String getName() { return name;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 110

Multiple choice Unit 1: Using Objects and Methods
Consider the following method: public double doubleVal(double x) { return x * 2; } The following code segment calls the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 101 of 2,811
Page 11 of 282