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 221–230 of 454
  1. 221
  2. 222
  3. 223
  4. 224
  5. 225
  6. 226
  7. 227
  8. 228
  9. 229
  10. 230

Question 221

Multiple choice Using Objects
Given the following code, what is the final value stored in p? String word =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 222

Multiple choice Using Objects
The State class, described earlier, contains the method private void calculatePercentChange() { / / Calculates and saves the percent change in population from…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 223

Multiple choice Using Objects
Consider the following Java code segment: String str1 = "hello"; String str2 = new String("hello"); String str3 = str1;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 224

Multiple choice Using Objects
Consider the following code segment: public class TextProcessor { private String text; public TextProcessor(String text) { this.text = text; } public String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 225

Multiple choice Using Objects
Consider the following class definition: public class TextAnalyzer { private String text; public TextAnalyzer(String text) { this.text = text; } public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 226

Multiple choice Using Objects
Consider the following class definition: public class Data { private int value; public Data(int value) { this.value = value; } public int getValue() { return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 227

Multiple choice Using Objects
Given the following class definition: public class Calculator { private int value; public Calculator(int initialValue) { value = initialValue; } public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 228

Multiple choice Using Objects
Consider the following Java code: public class StringManipulator { public static void main(String[] args) { String text = "Computer…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 229

Multiple choice Using Objects
What is the output of the following code segment? String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 230

Multiple choice Using Objects
Consider the following code segment: String str = "Computer Science"; String sub =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 221 of 454
Page 23 of 46