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 201–210 of 454
  1. 201
  2. 202
  3. 203
  4. 204
  5. 205
  6. 206
  7. 207
  8. 208
  9. 209
  10. 210

Question 201

Multiple choice Using Objects
Consider the following code segment: String s1 = "Hi There"; String s2 = s1; String s3 = s2; String s4 =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 202

Multiple choice Using Objects
Given the following code segment: String s = "Computer Science is fun!"; String s1 = s.substring(0,8); String s2…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 203

Multiple choice Using Objects
Consider the following code segment: String s1 = new String("hi"); String s2 = new String("hi there"); String s3 = s2.substring(0, 2);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 204

Multiple choice Using Objects
Consider the following code segment: public static void test(String str, int y) { str = str + "bow"; y = y *…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 205

Multiple choice Using Objects
Consider the following code segment: String str = "mnopqr"; for (int x = 0; x < str.length() - 1; x++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 206

Multiple choice Using Objects
Consider the following code segment: int x = 2; int y = -1; while (x < 30) { x =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 207

Multiple choice Using Objects
Consider the following class declaration: public class Test { private int value; public Test(int n) { value = n; } public void add(int amount) { value = value +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 208

Multiple choice Using Objects
What is printed when the following code segment is executed? String url = "http://www.usa.gov"; int pos =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 209

Multiple choice Using Objects
Given file line "Alice-90", how…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 210

Multiple choice Using Objects
Which of the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 201 of 454
Page 21 of 46