Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2016
    Posts
    26

    What is the difference between super() and this()?


  2. #2
    Registered User
    Join Date
    Mar 2019
    Location
    Ahmedabad
    Posts
    180
    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.

  3. #3
    Senior Member
    Join Date
    Apr 2019
    Location
    Asia
    Posts
    146
    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!

  4. #4

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.