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

Which of the following variables can be accessed by any class in the same package and/or an external subclass of the class its in?

Question 2
college-boardComputer Science AAPExam Style
1 mark

Which kind of testing checks specific parts of software to ensure they behave as intended in isolation from other components?

Question 3
college-boardComputer Science AAPExam Style
1 mark

In Java programming language constants are defined using which modifier combination?

Question 4
college-boardComputer Science AAPExam Style
1 mark

Which of the following standard algorithms can be used to search for an element in an unsorted array and will always require examining each element at least once if the element is not present?

Question 5
college-boardComputer Science AAPExam Style
1 mark

Which data structure should be used to ensure the fastest retrieval of elements inserted in sorted order without additional sorting steps after each insertion?

Question 6
college-boardComputer Science AAPExam Style
1 mark

What is an example of an instance variable in Java?

Question 7
college-boardComputer Science AAPExam Style
1 mark

If a public instance method m1() calls another private instance method m2() within the same class, which statement accurately describes this scenario?

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

In Java, which keyword would you use to declare a constant whose value should not change after initialization and must be accessible only within its own class?

Question 9
college-boardComputer Science AAPExam Style
1 mark

Which type of Java variable has its scope limited to the block it is declared in?

Question 10
college-boardComputer Science AAPExam Style
1 mark

If a method parameter has the same name as an instance variable, which one will be used within the method body without specifying 'this'?