- As a function
- As an object
Arguments: This keyword can accepts all the arguments that has been used to create a constructor.
Example: In the constructor of the FashionDesigner class, super has been used as a function. Whereas, in the doTasks() function of the FashionDesigner class, super has been used as an object. In the constructor of the fashion designer class, the super keyword has been used as a function to call the parent class’s constructor by passing the parameters to the fashion designer. This step is important to be carried out to ensure that FashionDesigner is an instance of Person. In the doTasks() function, super is used as an object that refers to the parent class Person’s instance. Here, the super keyword is used to explicitly call the methods of the parent class Person.
Sayan is a Fashion Designer Sayanis at home Sayanis at work Sayan is a Fashion Designer
- Calling A Super Class Constructor in Scala
- Difference between Primary key and Super key
- Calling a Super Class Constructor in Python
- Golang program that uses fallthrough keyword
- How to implement is functionality without using is keyword in C#
- Final keyword in PHP
- Global keyword in Python
- Invoking an overloaded constructor using this keyword in C#
- Throw Keyword in Scala
- CSS | currentcolor keyword
- PHP | var keyword
- CSS | revert keyword
- ES6 | Void Keyword
- Difference between revert and unset keyword in CSS
- CSS | unset keyword
- Difference between private keyword and private fields in TypeScript
- Range Keyword in Golang
- Golang program that uses defer keyword
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.