previous
|
start
|
next
Syntax 13.3: Calling a Superclass Constructor
ClassName(
parameters
)
{
super(
parameters
);
. . .
}
Example:
public CheckingAccount(double initialBalance) { super(initialBalance); transactionCount = 0; }
Purpose:
To invoke a constructor of the superclass. Note that this statement must be the first statement of the subclass constructor.
previous
|
start
|
next