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.

Subtopic: Using Objects Clear filter

Questions 51–60 of 454
  1. 51
  2. 52
  3. 53
  4. 54
  5. 55
  6. 56
  7. 57
  8. 58
  9. 59
  10. 60

Question 51

Multiple choice Using Objects
What is returned by this method call: translator("pokemon")? public String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 52

Multiple choice Using Objects
What will this method call print to the screen? public static void formatText(int a, int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 53

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 54

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 55

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 56

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 57

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 58

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 59

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 60

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 51 of 454
Page 6 of 46