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 441–450 of 3,140
  1. 441
  2. 442
  3. 443
  4. 444
  5. 445
  6. 446
  7. 447
  8. 448
  9. 449
  10. 450

Question 441

Free response Unit 1: Using Objects and Methods
A game application needs to process words. You will write two methods for the WordScrambler class, which has a single private instance variable: private String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 442

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment. String s = "PRACTICE"; String t = s.substring(2, 6); int result =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 443

Multiple choice Unit 1: Using Objects and Methods
What is printed by the following code segment? int a = - 8, b = 3; int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 444

Multiple choice Unit 1: Using Objects and Methods
The following code extracts individual digits from an integer. What is printed? int n = 2345;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 445

Multiple choice Unit 1: Using Objects and Methods
What is printed by the following? String p = "apple"; String q = "apricot"; String r = "app";…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 446

Multiple choice Unit 1: Using Objects and Methods
What is printed? double x = Math.pow(3, 4);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 447

Multiple choice Unit 1: Using Objects and Methods
What is printed by the following? String msg = "artificial intelligence"; int space = msg.indexOf(" "); String first =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 448

Multiple choice Unit 1: Using Objects and Methods
What is printed? int a = 17, b = 5; int q = a / b; int r = a %…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 449

Multiple choice Unit 1: Using Objects and Methods
What is printed? String a = "Java"; String b = "java"; String c = "Java";…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 450

Multiple choice Unit 1: Using Objects and Methods
What is printed by the following? String s = "ABCDEFGHIJ"; String t =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 441 of 3,140
Page 45 of 314