Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods Practice Questions

Work through AP Computer Science A practice 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 441–450 of 776
  1. 441
  2. 442
  3. 443
  4. 444
  5. 445
  6. 446
  7. 447
  8. 448
  9. 449
  10. 450

Question 441

Free response Using Objects
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 Using Objects
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 Primitive Types
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 Primitive Types
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 Using Objects
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 Primitive Types
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 Using Objects
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 Primitive Types
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 Using Objects
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 Using Objects
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 776
Page 45 of 78