Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice 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 391–400 of 3,140
  1. 391
  2. 392
  3. 393
  4. 394
  5. 395
  6. 396
  7. 397
  8. 398
  9. 399
  10. 400

Question 391

Multiple choice Unit 1: Using Objects and Methods
Given the following code, what is the final value stored in s4?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 392

Multiple choice Unit 1: Using Objects and Methods
Given that "J" comes before "j" in the dictionary and the following variables have been defined…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 393

Multiple choice Unit 1: Using Objects and Methods
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 394

Multiple choice Unit 1: Using Objects and Methods
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 395

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 396

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 397

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 398

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 399

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 400

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 391 of 3,140
Page 40 of 314