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.

Questions 281–290 of 681
  1. 281
  2. 282
  3. 283
  4. 284
  5. 285
  6. 286
  7. 287
  8. 288
  9. 289
  10. 290

Question 281

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 282

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 283

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 284

Multiple choice Primitive Types
What is printed when the following statement is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 285

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 286

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 287

Multiple choice Primitive Types
Evaluate the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 288

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 289

Multiple choice Primitive Types
Consider the following code snippet: public class Main { public static void main(String[] args) { int a = 5;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 290

Multiple choice Primitive Types
Consider the following code snippet. public static void main(String args[]){ final…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 281 of 681
Page 29 of 69