We have moved our domain from sapnuts.com to zapnuts.com, please bookmark and share.

  • These are special type of methods
  • constructor method is executed automatically whenever a object is created or instantiated
  • These methods are mainly used to set default values in a class
  • The name of the constructor method is 'constructor'
  • These methods have only importing parameters
  • There are no exporting parameters

Related questions