What is the difference between super() and this()?
introduction to programming oracle dba training java se 8 programming itil service operation training
What is the difference between super() and this()?
introduction to programming oracle dba training java se 8 programming itil service operation training
super() as well as this() both are used to make constructor calls.
super() is used to call Base class's constructor(i.e, Parent's class) while this() is used to call current class's constructor.
If you use this() and super() together in a constructor it will give compile time error.
super() as well as this() both are used to make constructor calls.
super() is used to call Base class's constructor(i.e, Parent's class) while this() is used to call current class's constructor.
super() is used to call Base class's(Parent class's) constructor.
█ ServersBase.Com- sales@serversbase.com
█ SSD cPanel Web Hosting • LiteSpeed • MariaDB • CloudLinux & MultiPHP!
█ Solutions Tailored To Your Requirements For Unbeatable Agility.
█ Fully Managed Cloud Instances, Daily Backups & Active Monitoring!
|
Bookmarks