What are the Types of constructors?

Author Topic: What are the Types of constructors?  (Read 236 times)

Offline beingchinmayTopic starter

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 0
  • Posts: 43
  • Karma: 0
  • Gender: Male
  • I am Chinmay
    • Fat Cutter
What are the Types of constructors?
« on: 11-30-2016, 03:07:34 »
•   Static Constructor

•   Default Constructor

•   Private Constructor

•   Copy Constructor

•   Parameterized Constructor


Offline emma rabah

  • Trade Count: (0)
  • Semi-Newbie
  • *
  • Thank You 0
  • Posts: 12
  • Karma: 0
Re: What are the Types of constructors?
« Reply #1 on: 11-30-2016, 05:09:44 »
Constructor:-Constructor is used for Initializing the values to the data members of the Class.
Default Constructor:- Default Constructor is also called as Empty Constructor which has no arguments
Parameterized Constructor :-his is Another type  Constructor which has some Arguments and same name as class name but it uses some Arguments.
Copy Constructor:-In this Constructor we pass the object of class into the Another Object of Same Class. As name Suggests you Copy, means Copy the values of one Object into the another Object of Class .

 

Related Topics

  Subject / Started by Replies Last post
13 Replies
6162 Views
Last post 04-01-2016, 04:46:21
by ShreyaKoushik
40 Replies
52726 Views
Last post 06-15-2013, 04:21:56
by zuaneducation
46 Replies
37749 Views
Last post 08-26-2013, 04:51:10
by johnkelly35
0 Replies
4184 Views
Last post 05-07-2012, 01:49:12
by richard branson
7 Replies
4847 Views
Last post 04-01-2016, 04:37:26
by ShreyaKoushik