PDA

View Full Version : What is the difference between super() and this()?



priya01
06-02-2016, 10:43 PM
What is the difference between super() and this()?

penrix
06-02-2016, 11:50 PM
super() is used to call super class constructor, whereas this() used to call constructors in the same class, means to call parameterized constructors.

pxljobs
08-25-2016, 03:20 AM
The keyword this() used to invoke a constructor of the same class super() can be used to invoke a super class constructor this is the main difference of the super and this keyword.

jeffronald19
12-27-2016, 10:18 PM
this() can be used to invoke a constructor of the same class

super() can be used to invoke a super class constructor

aceamerican
02-06-2017, 05:07 AM
super() is used to call super class constructor, whereas this() used to call constructors in the same class, means to call parameterized constructors.