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 151–160 of 454
  1. 151
  2. 152
  3. 153
  4. 154
  5. 155
  6. 156
  7. 157
  8. 158
  9. 159
  10. 160

Question 151

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 152

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 153

Multiple choice Using Objects
What is printed as a result of executing the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 154

Multiple choice Using Objects
Consider the following code segment. String str1 = "presto chango"; String str2 = "abracadabra"; int i =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 155

Multiple choice Using Objects
Which of the following returns the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 156

Multiple choice Using Objects
Which statement assigns a random integer…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 157

Multiple choice Using Objects
After executing the code segment, what are the possible…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 158

Multiple choice Using Objects
Which of the following statements generates a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 159

Multiple choice Using Objects
Consider the following code segment. int r = 100; int answer = (int)(Math.PI * Math.pow(r,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 160

Multiple choice Using Objects
Consider the following code segment. String ex1 = "example"; String ex2 = "elpmaxe"; ex1 = ex1.substring(1, ex1.indexOf("p")); ex2 = ex2 + ex2.substring(3,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 151 of 454
Page 16 of 46