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.
All 776
Multiple choice 681
Free response 95
Consider the following method: public static int mystery(int y) { y = 2 * y + y; y = 2 * y + y; return y; } Which of the…
Sign up now. It's free!
See the full question with its answer and worked solution.
Given the following code segment: String s1 = new String("hi"); String s2 = new String("hi"); String s3 = s2;…
Sign up now. It's free!
See the full question with its answer and worked solution.
Consider the following code segment: String s1 = "Hi There"; String s2 = s1; String s3 = s2; String s4 =…
Sign up now. It's free!
See the full question with its answer and worked solution.
Given the following code segment: String s = "Computer Science is fun!"; String s1 = s.substring(0,8); String s2…
Sign up now. It's free!
See the full question with its answer and worked solution.
Consider the following code segment: String s1 = new String("hi"); String s2 = new String("hi there"); String s3 = s2.substring(0, 2);…
Sign up now. It's free!
See the full question with its answer and worked solution.
Consider the following code segment: public static void test(String str, int y) { str = str + "bow"; y = y *…
Sign up now. It's free!
See the full question with its answer and worked solution.
Consider the following code segment: String str = "mnopqr"; for (int x = 0; x < str.length() - 1; x++) {…
Sign up now. It's free!
See the full question with its answer and worked solution.
Consider the following code segment: int x = 2; int y = -1; while (x < 30) { x =…
Sign up now. It's free!
See the full question with its answer and worked solution.
Consider the following class declaration: public class Test { private int value; public Test(int n) { value = n; } public void add(int amount) { value = value +…
Sign up now. It's free!
See the full question with its answer and worked solution.
This question involves the design of a simulation of birds or a bear eating from a bird feeder. You will write two methods of the Feeder class below. public…
Sign up now. It's free!
See the full question with its answer and worked solution.
Page 36 of 78
Get your FRQs graded in the Student Portal
In the Verityprep Student Portal, answer the FRQs of AP practice and past exams by typing or uploading a photo. A teacher grades them with that year's official College Board scoring guidelines and gives you an estimated 1–5 score.
Join Verityprep now
AP® and Advanced Placement® are registered trademarks of the College Board, which is not affiliated with, and does not endorse, Verityprep. Names are used for identification purposes only.