Java OOPs Interview Questions and Answers
Question: Explain the 'super()' statement in a constructor.Answer: The 'super()' statement is used to invoke the constructor of the superclass. It must be the first statement in the subclass constructor if used.Example:
|
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Is it helpful? Yes No
Most helpful rated by users: