In AP Computer Science A, super() is the Java statement a subclass constructor uses to call its superclass's constructor, and it must be the first statement in that constructor; if you don't write it, Java automatically inserts an implicit call to the superclass's no-argument constructor.
super() is how a subclass constructor hands off the job of initializing the inherited part of an object. When you write public Rectangle(double w, double h) in a class that extends Shape, the Shape instance variables still need to be set up. Calling super() (or super(args) with parameters) runs the superclass constructor to do exactly that. Think of building an object like building a house. The superclass constructor pours the foundation, and the subclass constructor adds its own rooms on top. super() is the line that says "pour the foundation first."
Two rules matter constantly on the exam. First, a call to super() must be the first statement in the subclass constructor. Second, if you don't write any super call at all, the compiler silently inserts super() with no arguments. That's fine when the superclass has a no-argument constructor, but if the superclass only has constructors that take parameters, your code won't compile until you explicitly call super(args) with matching arguments.
super() lives in Unit 9 (Inheritance), where you build class hierarchies with extends and write subclass constructors that correctly initialize inherited state. The CED expects you to create subclasses whose constructors pass values up to the superclass constructor, and to trace what happens when constructors chain. This shows up directly in the Class FRQ whenever you're asked to write a subclass: the very first line of your constructor is almost always a super(...) call, and forgetting it (or putting it second) costs points. It also connects to the big-picture idea of inheritance itself. A subclass object is built superclass-first, and super() is the mechanism that makes that order happen.
Inheritance (Unit 9)
super() only exists because of inheritance. When a subclass extends a superclass, the inherited instance variables are usually private, so the subclass can't set them directly. Calling the superclass constructor through super(args) is the only clean way to initialize them.
Constructor (Unit 2 / Unit 9)
Everything you learned about constructors in Unit 2 (matching parameters to arguments, initializing instance variables) comes back here with one twist. Constructors chain upward, so a subclass constructor always runs a superclass constructor first, either explicitly with super(args) or implicitly.
Subclass (Unit 9)
A subclass object is really two layers in one: the superclass part and the subclass part. super() builds the superclass layer before the subclass constructor finishes the rest, which is why it has to come first.
Method overriding (Unit 9)
The super keyword does double duty. Inside a constructor, super(args) calls the superclass constructor. Inside an overridden method, super.methodName() calls the superclass's version of that method, which lets you reuse the parent's behavior and add to it instead of rewriting it.
On the multiple-choice section, super() questions usually give you a class hierarchy and ask one of three things: which statement correctly calls a superclass constructor, what gets printed when constructors chain (tracing the superclass-first order), or what happens when a subclass constructor omits super() entirely. That last one is a favorite trap. The answer depends on whether the superclass has a no-argument constructor; if it doesn't, the code won't compile. On the free-response section, the Class FRQ frequently asks you to write a subclass of a given class. Your constructor should start with super(...), passing along the parameters the superclass constructor needs, and then initialize any new instance variables the subclass adds. Writing this.name = name for a private superclass variable instead of calling super(name, price) is a classic way to lose points, since the subclass can't touch private superclass fields directly.
super() with parentheses right after the keyword calls the superclass constructor, and it's only legal as the first statement of a subclass constructor. super.methodName() calls the superclass's version of a method, and you use it inside an overridden method when you want the parent's behavior plus something extra. Same keyword, two different jobs. One builds the object, the other reuses a method.
super() calls the superclass constructor from a subclass constructor, and it must be the first statement in that constructor.
If a subclass constructor doesn't explicitly call super(), Java automatically inserts an implicit call to the superclass's no-argument constructor.
If the superclass has no no-argument constructor, the subclass constructor must explicitly call super(args), or the code won't compile.
Constructors chain superclass-first, so the superclass constructor always finishes running before the subclass constructor's own code executes.
Use super(args) to initialize private superclass instance variables, because the subclass cannot assign to them directly.
super.methodName() is different from super(): it calls the superclass's version of an overridden method, not the constructor.
super() is the statement a subclass constructor uses to call its superclass's constructor, initializing the inherited instance variables. It must be the first statement in the subclass constructor, and you can pass arguments with super(args) to match a parameterized superclass constructor.
The compiler automatically inserts an implicit call to the superclass's no-argument constructor. That works fine if the superclass has one, but if the superclass only defines constructors with parameters, the code won't compile until you add an explicit super(args) call.
Yes. A call to super() or super(args) must be the very first statement in the subclass constructor. Putting any other statement before it is a compile error, and this rule shows up regularly in AP CSA multiple-choice questions.
super() calls the superclass constructor and only appears as the first statement of a subclass constructor. super.methodName() calls the superclass's version of a method from inside an overridden method, letting you reuse the parent's behavior. They use the same keyword but do completely different things.
Usually no. Superclass instance variables are typically private, so the subclass can't assign to them directly, even with this. Calling super(args) lets the superclass constructor do that initialization for you, which is the pattern the Class FRQ expects.