zuai-logo
zuai-logo
  1. AP Computer Science A
FlashcardFlashcardStudy GuideStudy GuideQuestion BankQuestion Bank

Writing Classes in AP Computer Science A

Question 1
college-boardComputer Science AAPExam Style
1 mark

If a class contains a public void method named 'updateScore', what can be inferred about this method?

Question 2
college-boardComputer Science AAPExam Style
1 mark

Which method signature correctly indicates overloading when added to a class containing public void processData(int data)?

Question 3
college-boardComputer Science AAPExam Style
1 mark

What happens when a primitive value is passed as a parameter to a method in Java?

Question 4
college-boardComputer Science AAPExam Style
1 mark

If you need a method that checks whether its input integer parameter is prime or not, what should be its return type?

Question 5
college-boardComputer Science AAPExam Style
1 mark

What is the purpose of parameters?

Question 6
college-boardComputer Science AAPExam Style
1 mark

Which of the following is NOT an access modifier in Java?

Question 7
college-boardComputer Science AAPExam Style
1 mark

If a class has a private instance variable named 'radius', which method signature would be appropriate for setting its value?

Feedback stars icon

How are we doing?

Give us your feedback and let us know how we can improve

Question 8
college-boardComputer Science AAPExam Style
1 mark

What alteration can be made so a method designed to find and return only prime numbers from an integer list inadvertently returns all odd numbers instead?

Question 9
college-boardComputer Science AAPExam Style
1 mark

What is the result of calling Arrays.binarySearch(arr, 4) if arr is an array containing {1, 3, 4, 6, 8} after being sorted?

Question 10
college-boardComputer Science AAPExam Style
1 mark

Given two different algorithms with time complexities of O(nlog⁡n)O(n \log n)O(nlogn) and O(n2)O(n^2)O(n2), which scenario would most likely show a noticeable performance difference between them?