Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions unit by unit, 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 181–190 of 2,811
  1. 181
  2. 182
  3. 183
  4. 184
  5. 185
  6. 186
  7. 187
  8. 188
  9. 189
  10. 190

Question 181

Multiple choice Unit 1: Using Objects and Methods
This question refers to the following declaration. String line = "Some more silly stuff on strings!"; / / the words are separated by a single space What…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 182

Multiple choice Unit 1: Using Objects and Methods
A program has a String variable fullName that stores a first name, followed by a space, followed by a last name. There are no spaces in either the first or last…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 183

Multiple choice Unit 1: Using Objects and Methods
One of the rules for converting English to Pig Latin states: If a word begins with a consonant, move the consonant to the end of the word and add "ay". Thus…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 184

Multiple choice Unit 1: Using Objects and Methods
This question refers to the getString method shown below. public static String getString(String s1, String s2) { int index = s1.indexOf(s2); return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 185

Multiple choice Unit 1: Using Objects and Methods
public class Position { /** row and col are both >= 0 except in the default * constructor where they are initialized to -1. */ private int row, col; public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 186

Multiple choice Unit 1: Using Objects and Methods
Which boolean expression about p1 and p3 is true? I…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 187

Multiple choice Unit 1: Using Objects and Methods
public class IntPair { private int firstValue; private int secondValue; public IntPair(int first, int second) { firstValue = first; secondValue = second; }…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 188

Multiple choice Unit 1: Using Objects and Methods
Consider the following program that uses the IntPair class. public class IntPair { private int firstValue; private int secondValue; public IntPair(int first,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 189

Multiple choice Unit 1: Using Objects and Methods
public class Name { private String firstName; private String lastName; public Name(String first, String last) / / constructor { firstName = first; lastName =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 190

Multiple choice Unit 1: Using Objects and Methods
public class Name { private String firstName; private String lastName; public Name(String first, String last) / / constructor { firstName = first; lastName =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 181 of 2,811
Page 19 of 282