AP Computer Science A 50 Flashcards Intermediate 100% Free

AP Computer Science A:: Using Objects

Created by Chat Robotics Community  ·  Updated 2026-08-30

Curriculum Overview

Comprehensive, high-yield AP Computer Science A study deck focusing on Using Objects. Features 50 rigorous, curriculum-aligned flashcards designed for intermediate-level mastery. Core concepts covered include Using Objects, key problem-solving heuristics, foundational formulas, and exam-tested application scenarios. Ideal for active recall review, spaced repetition study, and scoring in the top percentile.

Topics & Key Concepts

Alex Java Math This CLASS Given Hello String Casting Science

Sample Flashcard Questions & Answers

Showing 8 of 50 cards
Question #1 Active Recall

In object-oriented programming, what is a CLASS?

- **A)** A synonym for a primitive data type
- **B)** A single specific instance of data stored in memory
- **C)** A blueprint or template that defines the properties (instance variables) and behaviors (methods) that its objects will have
- **D)** A method that returns no value

Answer & Explanation:
**Answer: C)**

A class defines the structure and behavior shared by all objects created from it; each individual object is a separate INSTANCE of that class.
Question #2 Active Recall

What is an OBJECT, as distinguished from a CLASS?

- **A)** A specific instance created from a class, with its own actual values stored in its instance variables
- **B)** A synonym for a class -- the two terms are always interchangeable
- **C)** The blueprint that defines what instance variables and methods will exist
- **D)** A method inside a class

Answer & Explanation:
**Answer: A)**

If a class is the blueprint, an object is one actual 'thing' built from that blueprint, with its own concrete data.
Question #3 Active Recall

Which line of code correctly declares AND instantiates a \(String\) object named \(name\) using the \(new\) keyword?

- **A)** \(String\ name = new\ String("Alex");\)
- **B)** \(new\ String\ name = "Alex";\)
- **C)** \(String\ new\ name = "Alex";\)
- **D)** \(name = String("Alex");\)

Answer & Explanation:
**Answer: A)**

The standard object-creation syntax is \(ClassName\ variableName = new\ ClassName(arguments);\).
Question #4 Active Recall

What are the THREE steps involved in creating and using an object in Java?

- **A)** Casting, printing, and looping
- **B)** Only a single step: instantiation
- **C)** DECLARATION (creating a reference variable of the class type), INSTANTIATION (using \(new\) to create the actual object in memory), and INITIALIZATION (the constructor setting up the object's initial state)
- **D)** Declaration, deletion, and re-declaration

Answer & Explanation:
**Answer: C)**

These three conceptual steps -- often combined into a single line of code -- together produce a fully usable, initialized object.
Question #5 Active Recall

What is a CONSTRUCTOR in a Java class?

- **A)** A method that destroys an object when it is no longer needed
- **B)** A variable that stores the class's name as a String
- **C)** A special method, with the same name as the class and no return type, that runs automatically when an object is created with \(new\), used to initialize the object's instance variables
- **D)** A method that must return an \(int\)

Answer & Explanation:
**Answer: C)**

Constructors set up a new object's initial state; Java automatically calls the constructor whenever \(new\) creates an object.
Question #6 Active Recall

What is the difference between calling a VOID method and calling a method that RETURNS a value?

- **A)** Only value-returning methods can accept parameters
- **B)** A void method performs an action but gives back no value (so it cannot be used on the right side of an assignment), while a method with a return type gives back a value that can be stored in a variable or used in an expression
- **C)** Void methods and value-returning methods behave identically in every respect
- **D)** A void method always returns the value \(0\)

Answer & Explanation:
**Answer: B)**

Understanding whether a method call can be used as an expression (has a usable return value) or only as a standalone statement (void) is a fundamental object-usage skill.
Question #7 Active Recall

Given \(String\ s = "Hello";\), what does \(s.length()\) return?

- **A)** \(5\)
- **B)** \("Hello"\)
- **C)** \(6\)
- **D)** \(4\)

Answer & Explanation:
**Answer: A)**

\(length()\) returns the number of characters in the String; "Hello" has 5 characters: H, e, l, l, o.
Question #8 Active Recall

Given \(String\ s = "Hello";\), what does \(s.charAt(1)\) return?

- **A)** \('l'\)
- **B)** \('H'\)
- **C)** \(1\)
- **D)** \('e'\)

Answer & Explanation:
**Answer: D)**

String indices start at 0, so index 0 is 'H' and index 1 is 'e'.

Want to study all 50 flashcards with spaced repetition?

Practice with Anki-style scheduling, Hands-Free audio commute mode, and AI Tutor explanations.

Start Studying Full Deck Now

How You Can Study This Deck on Chat Robotics

Anki Spaced Repetition (SRS)

Algorithms schedule review intervals automatically so you retain 90%+ in minimum study time.

Hands-Free Audio Commute Mode

High-fidelity Neural Text-To-Speech reads questions and answers aloud with customizable delay timers.

Built-in AI Tutor Assistant

Stuck on a tricky concept? Click "Ask AI" on any card to receive instant deep-dive step-by-step explanations.

Subdeck & Tag Organization

Organize and filter by topic tags or drill entire subdeck hierarchies sequentially in Subdeck Scheduler.