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.
Constructor overloading means a single class has more than one constructor, and each one takes a different parameter list. 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 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.
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 to a usable state. It builds directly on what you learned back in Unit 2 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.
Keep studying AP Computer Science A Unit 1
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. Master one and you've mastered the other.
Parameterized Constructor (Unit 5)
Overloading usually means a class has several parameterized constructors 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 unless you wrote that version explicitly.
new Keyword (Unit 2)
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.
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.
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.
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.
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.
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.
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.
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.
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.