Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods Practice Questions

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

Question 181

Multiple choice Using Objects
Refer to these declarations. Integer k = new Integer(8); Integer m = new Integer(4); Which test(s) will generate a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 182

Multiple choice Using Objects
Consider the following code fragment. Object intObj = new Integer(9); System.out.println(intObj); You may…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 183

Multiple choice Using Objects
Consider these declarations. String s1 = "crab"; String s2 = new String("crab"); String s3 = s1;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 184

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 185

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 186

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 187

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 188

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 189

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 190

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 181 of 546
Page 19 of 55