OOPs Concepts
Programming and Technical
Programming
Definition
. What is the difference between this() and super()?
Read Solution (Total 2)
-
- this()
1) used to call the constructor of the same class
2) used when the instance and local variable have the same names
super()
1) used to call the immediate parent class constructor
2) when the instance variables of the base and derived classes have the same name - 9 years agoHelpfull: Yes(2) No(0)
- this() for calling the constructor of same class
super() for calling the constructor of super class - 11 years agoHelpfull: Yes(1) No(0)
OOPs Concepts Other Question