What are the Types of constructors?

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

Offline beingchinmayTopic starter

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 1
  • Posts: 73
  • 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
12 Replies
7010 Views
Last post 03-30-2016, 23:56:49
by harsinha0018
40 Replies
60074 Views
Last post 06-15-2013, 04:21:56
by zuaneducation
46 Replies
42353 Views
Last post 08-26-2013, 04:51:10
by johnkelly35
0 Replies
4692 Views
Last post 05-07-2012, 01:49:12
by richard branson
6 Replies
5339 Views
Last post 03-29-2016, 01:49:41
by harsinha0018