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 301–310 of 454
  1. 301
  2. 302
  3. 303
  4. 304
  5. 305
  6. 306
  7. 307
  8. 308
  9. 309
  10. 310

Question 301

Multiple choice Using Objects
Consider the following code segment.
String s = "computer";
String t = s.substring(0, s.indexOf("u")) + s.substring(5);
What value is stored in t ?
Pick an answer, then check it. The solution opens in a window.

Question 302

Multiple choice Using Objects
Consider the following code segment. String s = "campus"; String t =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 303

Multiple choice Using Objects
Consider the following code segment. String word = "algorithm"; String part =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 304

Multiple choice Using Objects
Consider the following declarations. String s1 = "grid"; String s2 = "grip"; boolean same = s1.equals(s2);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 305

Multiple choice Using Objects
Consider the following code segment. String word = "practice"; String result =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 306

Multiple choice Using Objects
Consider the following code segment. String s = "science"; String t =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 307

Multiple choice Using Objects
Consider the following code segment. String a = "carpet"; String b =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 308

Multiple choice Using Objects
Consider the following declarations. String x = "stone"; String y =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 309

Multiple choice Using Objects
Consider the following code segment. String code = "calendar"; String part =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 310

Multiple choice Using Objects
Consider the following code segment. String a = "mark"; String b = "mask"; boolean first = a.compareTo(b) < 0;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 301 of 454
Page 31 of 46