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.

Subtopic: Using Objects Clear filter

Questions 211–220 of 546
  1. 211
  2. 212
  3. 213
  4. 214
  5. 215
  6. 216
  7. 217
  8. 218
  9. 219
  10. 220

Question 211

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 212

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 213

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 214

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 215

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 216

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 217

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 218

Multiple choice Using Objects
Consider the following method. public int countLetters(String word, String letter) { int count = 0; for (int index = 0;index < word.length();index++) { if ( /…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 219

Free response Using Objects
In the seventeenth century, Location Numerals were invented as a new way to represent numbers. Location Numerals have a lot in common with the binary number…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 220

Multiple choice Using Objects
Consider the following code segment. String newString = "Welcome"; String anotherString = "Home"; newString =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 211 of 546
Page 22 of 55