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 311–320 of 681
  1. 311
  2. 312
  3. 313
  4. 314
  5. 315
  6. 316
  7. 317
  8. 318
  9. 319
  10. 320

Question 311

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 312

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 313

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 314

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 315

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 316

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 317

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 318

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 319

Multiple choice Using Objects
Which of the following code segments correctly creates an…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 320

Multiple choice Primitive Types
What is the data type of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 311 of 681
Page 32 of 69