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

Question 311

Multiple choice Unit 1: Using Objects and Methods
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 Unit 1: Using Objects and Methods
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 Unit 1: Using Objects and Methods
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 Unit 1: Using Objects and Methods
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 Unit 1: Using Objects and Methods
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 Unit 1: Using Objects and Methods
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 Unit 1: Using Objects and Methods
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 Unit 1: Using Objects and Methods
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 Unit 1: Using Objects and Methods
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 Unit 1: Using Objects and Methods
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 2,811
Page 32 of 282