AP Computer Science A Quiz
19 questions · no time limit
0:00
CLASS CREATION
Question 1 of 19
No time limit
Current
Answered
Flagged
Not seen
Refer to the Car class code below: what value will the field year have after executing new Car("Honda", "Civic")?
public class Car {
private String make;
private String model;
private int year;
// Public default constructor: uses placeholder make/model.
public Car() {
this("Unknown", "Unknown");
}
// Public parameterized constructor: sets make/model and defaults year.
public Car(String make, String model) {
this(make, model, 2026); // Chained to the full constructor
}
// Private full constructor: sets all fields.
private Car(String make, String model, int year) {
this.make = make;
this.model = model;
this.year = year;
}
} YOUR PROGRESS
19
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
KEYBOARD
Pick an answer ABCD
Next question ↵→
Previous ←
Flag for review F
Answers save as you go · flagged questions come back at the end