213k views
4 votes
4. When the keyword ____________________ is followed by a parenthesis, it indicates a call to the superclass constructor.

User Gargamel
by
5.3k points

1 Answer

2 votes

Answer:

Super

Step-by-step explanation:

In object-oriented programming (OOP) language, an object class represents the superclass of every other classes when using a programming language such as Java. The superclass is more or less like a general class in an inheritance hierarchy. Thus, a subclass can inherit the variables or methods of the superclass.

Basically, all instance variables that have been used or declared in any superclass would be present in its subclass object.

Hence, when the keyword super is followed by a parenthesis, it indicates a call to the superclass constructor and it should be the first statement declared in the subclass constructor.

User Txwikinger
by
6.0k points