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 121–130 of 454
  1. 121
  2. 122
  3. 123
  4. 124
  5. 125
  6. 126
  7. 127
  8. 128
  9. 129
  10. 130

Question 121

Multiple choice Using Objects
Suppose that strA = "TOMATO", strB = "tomato", and strC = "tom".…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 122

Multiple choice Using Objects
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 123

Multiple choice Using Objects
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 124

Multiple choice Using Objects
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 125

Multiple choice Using Objects
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 126

Multiple choice Using Objects
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 127

Multiple choice Using Objects
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 128

Multiple choice Using Objects
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 129

Multiple choice Using Objects
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 130

Multiple choice Using Objects
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 121 of 454
Page 13 of 46