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.

Questions 271–280 of 776
  1. 271
  2. 272
  3. 273
  4. 274
  5. 275
  6. 276
  7. 277
  8. 278
  9. 279
  10. 280

Question 271

Multiple choice Using Objects
Consider the following statement. int var = (int)(Math.random() * 50) +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 272

Multiple choice Primitive Types
Consider the following statement. System.out.print(13 + 6 + "APCSA" +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 273

Multiple choice Using Objects
Consider the following method. public boolean whatDoesItDo(String st) { for (int i = 0;i < st.length() / 2;i++) { String sub1 = st.substring(i, i + 1); String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 274

Multiple choice Using Objects
Consider the following method. public String mixItUp(String entry1, String entry2) { entry2 = entry1; entry1 =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 275

Multiple choice Using Objects
Consider the following method. The method is intended to return true if the value val raised to the power power is within the tolerance tolerance of the target…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 276

Multiple choice Using Objects
Consider the following method. public int firstLetterIndex(String s2) { String s1 = "abcdefghijklmnopqrstuvwxyz"; return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 277

Free response Using Objects
A Password class contains methods used to determine information about passwords. You will write two methods of the class. public class Password { private String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 278

Multiple choice Using Objects
Given the String declaration String course = "AP Computer…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 279

Multiple choice Using Objects
Consider the program segment. for (int i = start;i <= stop;i++) System.out.println("AP…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 280

Multiple choice Using Objects
Consider the following code segment. int num = (int)(Math.random() * 30 + 20); num += 5; num =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 271 of 776
Page 28 of 78