---
title: "Constructor Overloading — AP CSA Definition & Examples"
description: "Constructor overloading means a class has multiple constructors with different parameter lists. Learn how Java picks the right one and how AP CSA tests it."
canonical: "https://fiveable.me/ap-comp-sci-a/key-terms/constructor-overloading"
type: "key-term"
subject: "AP Computer Science A"
unit: "Unit 1"
---

# Constructor Overloading — AP CSA Definition & Examples

## Definition

Constructor overloading is when a class defines two or more constructors with different parameter lists (different number, types, or order of parameters), letting you create objects with different amounts of starting information; Java picks which constructor to run by matching the arguments you pass with new.

## What It Is

Constructor overloading means a single [class](/ap-comp-sci-a/unit-3/abstraction-and-program-design/study-guide/o9VgVeIpKRYZ7N7rXfUz "fv-autolink") has more than one constructor, and each one takes a different [parameter list](/ap-comp-sci-a/key-terms/parameter-list "fv-autolink"). They all share the class's name (constructors always do), so the only thing telling them apart is the parameters. That means the number of parameters, their types, or their order must differ. When you write `new Book("1984", "Orwell", 328)` versus `new Book("1984", "Orwell")`, Java looks at the arguments you passed and runs the constructor whose parameter list matches.

Why bother? Flexibility. Sometimes the caller knows everything about the [object](/ap-comp-sci-a/key-terms/object "fv-autolink") up front, and sometimes they only know part of it. An overloaded constructor with fewer parameters can fill in sensible defaults for the missing values (like setting `pages` to 0 or a `String` to a default value). Think of it like ordering at a restaurant. One constructor is the full custom order where you specify everything, and another is the combo meal where you give less info and the class fills in the rest.

## Why It Matters

Constructor overloading lives in the writing-classes portion of AP CSA (Unit 5, Writing Classes), where you design constructors that initialize an object's [instance variables](/ap-comp-sci-a/key-terms/instance-variables "fv-autolink") to a usable state. It builds directly on what you learned back in [Unit 2](/ap-comp-sci-a/unit-2 "fv-autolink") about calling constructors with `new`, because overloading is the reason a class like `Rectangle` can be created with zero arguments or several. On the exam, this concept tests whether you really understand signatures. If you can look at a `new` call and trace exactly which constructor runs and what values every instance variable ends up with, you've got the core skill the multiple-choice section is checking. It also sets you up for method overloading, which works on the exact same matching rules.

## Connections

### Method Overloading (Unit 5)

Constructor overloading is the same idea applied to constructors instead of regular methods. In both cases, Java tells the versions apart purely by parameter list, never by [return type](/ap-comp-sci-a/key-terms/return-type "fv-autolink"). Master one and you've mastered the other.

### Parameterized Constructor (Unit 5)

Overloading usually means a class has several parameterized [constructors](/ap-comp-sci-a/unit-3/constructors/study-guide/3Ez6zzak2wRwMrTj2ZQk "fv-autolink") side by side, like a three-argument version and a two-argument version. Each one initializes the same instance variables, just from different amounts of caller-supplied data.

### Default Constructor (Unit 5)

A no-argument constructor often sits alongside parameterized ones as part of an overloaded set. Watch out for the classic trap, though. Once you write any constructor yourself, Java stops providing the automatic no-argument one, so `new Car()` won't [compile](/ap-comp-sci-a/key-terms/compile "fv-autolink") unless you wrote that version explicitly.

### [new Keyword (Unit 2)](/ap-comp-sci-a/key-terms/new-keyword)

Overloading only matters at the moment of object creation. The arguments inside `new Student(...)` are what Java matches against the available constructor signatures, so reading `new` calls carefully is how you trace which constructor actually runs.

## On the AP Exam

This shows up almost entirely in multiple-choice form. Typical stems give you a class like `Book` or `Car` with two or three constructors, then ask which `new` call compiles, which constructor runs for a given call, or what the instance variables hold afterward. Another common stem asks directly which part of a constructor signature makes overloading possible (answer: the parameter list, since the name is fixed and constructors have no return type). On the FRQ side, no released free-response question has required overloading by name, but Question 2 (Class Design) often gives you freedom in how you write constructors, and knowing how to provide a full constructor plus a simpler one with defaults is a clean, point-safe move. Your main jobs: match arguments to parameter lists by count, type, and order, and remember that two constructors with identical parameter lists won't compile.

## Constructor Overloading vs Method Overloading

They follow the same rule (same name, different parameter lists) but apply to different things. Constructor overloading gives a class multiple ways to be initialized when an object is created with new. Method overloading gives a class multiple versions of a regular method, like two different `add` methods, that can be called any time after the object exists. Also remember constructors have no return type at all, so for constructors the parameter list is literally the only distinguishing feature.

## Key Takeaways

- Constructor overloading means one class has multiple constructors, and Java tells them apart only by their parameter lists (number, types, or order of parameters).
- Java decides which constructor to run by matching the arguments in the `new` call against the available parameter lists.
- Two constructors with the same parameter list will not compile, even if the parameter names are different, because parameter names are not part of the signature.
- Overloaded constructors with fewer parameters typically assign default values to the instance variables the caller didn't supply.
- If you write any constructor yourself, Java no longer provides the automatic no-argument constructor, so a `new ClassName()` call needs an explicitly written no-argument version.
- Constructors have no return type, so unlike methods, the parameter list is the only thing that can differ between them.

## FAQs

### What is constructor overloading in AP Computer Science A?

It's when a class defines two or more constructors with different parameter lists, so objects can be created with different sets of starting values. For example, `Book(String t, String a, int p)` and `Book(String t, String a)` can coexist in the same class.

### Can two constructors have the same number of parameters?

Yes, as long as the types or the order of types differ. `Point(int x, double y)` and `Point(double x, int y)` are legal together, but `Point(int a, int b)` and `Point(int x, int y)` are not, because parameter names don't count toward the signature.

### How is constructor overloading different from method overloading?

Same matching rule, different target. Constructor overloading applies to constructors, which run once at object creation via `new` and have no return type. Method overloading applies to regular methods you can call repeatedly. AP CSA tests both with the same logic: Java distinguishes versions by parameter list only.

### Does Java still give me a default constructor if I overload constructors?

No. The compiler only supplies the automatic no-argument constructor when you write zero constructors. The moment you define even one, `new ClassName()` fails to compile unless you also write a no-argument constructor yourself. This is a favorite MCQ trap.

### Which part of a constructor signature allows for overloading?

The parameter list. The constructor's name must match the class name and constructors have no return type, so the only way to distinguish overloaded constructors is by the number, types, or order of their parameters.

## Related Study Guides

- [1.13 Creating and Storing Objects](/ap-comp-sci-a/unit-1/creating-and-storing-objects/study-guide/rUOTKl6Ih5noXJ0GtxJF)

## Structured Data

```json
{"@context":"https://schema.org","@graph":[{"@type":"LearningResource","@id":"https://fiveable.me/ap-comp-sci-a/key-terms/constructor-overloading#resource","name":"Constructor Overloading — AP CSA Definition & Examples","url":"https://fiveable.me/ap-comp-sci-a/key-terms/constructor-overloading","learningResourceType":"Concept explainer","educationalLevel":"AP® / High School","about":{"@id":"https://fiveable.me/ap-comp-sci-a/key-terms/constructor-overloading#term"},"audience":{"@type":"EducationalAudience","educationalRole":"student"},"dateModified":"2026-06-11T00:50:32.343Z","isPartOf":{"@type":"Collection","name":"AP Computer Science A Key Terms","url":"https://fiveable.me/ap-comp-sci-a/key-terms"},"publisher":{"@type":"Organization","name":"Fiveable","url":"https://fiveable.me"}},{"@type":"DefinedTerm","@id":"https://fiveable.me/ap-comp-sci-a/key-terms/constructor-overloading#term","name":"Constructor Overloading","description":"Constructor overloading is when a class defines two or more constructors with different parameter lists (different number, types, or order of parameters), letting you create objects with different amounts of starting information; Java picks which constructor to run by matching the arguments you pass with new.","url":"https://fiveable.me/ap-comp-sci-a/key-terms/constructor-overloading","inDefinedTermSet":{"@type":"DefinedTermSet","name":"AP Computer Science A Key Terms","url":"https://fiveable.me/ap-comp-sci-a/key-terms"}},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is constructor overloading in AP Computer Science A?","acceptedAnswer":{"@type":"Answer","text":"It's when a class defines two or more constructors with different parameter lists, so objects can be created with different sets of starting values. For example, `Book(String t, String a, int p)` and `Book(String t, String a)` can coexist in the same class."}},{"@type":"Question","name":"Can two constructors have the same number of parameters?","acceptedAnswer":{"@type":"Answer","text":"Yes, as long as the types or the order of types differ. `Point(int x, double y)` and `Point(double x, int y)` are legal together, but `Point(int a, int b)` and `Point(int x, int y)` are not, because parameter names don't count toward the signature."}},{"@type":"Question","name":"How is constructor overloading different from method overloading?","acceptedAnswer":{"@type":"Answer","text":"Same matching rule, different target. Constructor overloading applies to constructors, which run once at object creation via `new` and have no return type. Method overloading applies to regular methods you can call repeatedly. AP CSA tests both with the same logic: Java distinguishes versions by parameter list only."}},{"@type":"Question","name":"Does Java still give me a default constructor if I overload constructors?","acceptedAnswer":{"@type":"Answer","text":"No. The compiler only supplies the automatic no-argument constructor when you write zero constructors. The moment you define even one, `new ClassName()` fails to compile unless you also write a no-argument constructor yourself. This is a favorite MCQ trap."}},{"@type":"Question","name":"Which part of a constructor signature allows for overloading?","acceptedAnswer":{"@type":"Answer","text":"The parameter list. The constructor's name must match the class name and constructors have no return type, so the only way to distinguish overloaded constructors is by the number, types, or order of their parameters."}}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"AP Computer Science A","item":"https://fiveable.me/ap-comp-sci-a"},{"@type":"ListItem","position":2,"name":"Key Terms","item":"https://fiveable.me/ap-comp-sci-a/key-terms"},{"@type":"ListItem","position":3,"name":"Unit 1","item":"https://fiveable.me/ap-comp-sci-a/unit-1"},{"@type":"ListItem","position":4,"name":"Constructor Overloading"}]}]}
```
