PRASHNIKAप्रश्निका
Back to the paper

State any one purpose of using the keyword super in Java programming.

Computer Science20231 markShort answer

Answer

Answer

AI
The keyword `super` is used in a subclass's constructor to invoke (call) the constructor of its immediate superclass, so that the inherited data members get initialised by the superclass's own constructor (e.g. `super(args);` as the first statement).
Inheritance, Interfaces and Polymorphism

From ISC 2023 Specimen Computer Science Paper 1, question 1(viii).