Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions on Using Objects and Methods, 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 681
  1. 101
  2. 102
  3. 103
  4. 104
  5. 105
  6. 106
  7. 107
  8. 108
  9. 109
  10. 110

Question 101

Multiple choice Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 681
Page 11 of 69