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.

Subtopic: Using Objects Clear filter

Questions 141–150 of 454
  1. 141
  2. 142
  3. 143
  4. 144
  5. 145
  6. 146
  7. 147
  8. 148
  9. 149
  10. 150

Question 141

Multiple choice Using Objects
Consider the following method. The method is intended to return true if the value val raised to the power power is within the tolerance tolerance of the target…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 142

Multiple choice Using Objects
Consider the following method. public int firstLetterIndex(String s2) { String s1 = "abcdefghijklmnopqrstuvwxyz"; return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 143

Multiple choice Using Objects
Given the String declaration String course = "AP Computer…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 144

Multiple choice Using Objects
Consider the program segment. for (int i = start;i <= stop;i++) System.out.println("AP…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 145

Multiple choice Using Objects
Consider the following code segment. int num = (int)(Math.random() * 30 + 20); num += 5; num =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 146

Multiple choice Using Objects
Consider the following method that is intended to remove all Strings from words that are less than six letters long. public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 147

Multiple choice Using Objects
Consider the following code segment. int varA = - 30; int varB = 30; while (varA != 0 || varB > 0) { varA = varA + 2; varB =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 148

Multiple choice Using Objects
The following incomplete code is intended to count the number of times the letter key is found in phrase. public static int countOccurrences (String phrase,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 149

Multiple choice Using Objects
Assume str1 and str2 are correctly initialized String variables. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 150

Multiple choice Using Objects
Assume names is a String array. Which statement…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 141 of 454
Page 15 of 46