| Author: Rajaram 20 Jun 2008 | Member Level: Silver | Rating: Points: 2 |
Default Constructor: When you want to initialise variables in the class to its default values.
Parameterised Constructor: When you want to initialise class valiables with externel values.
|
| Author: Rohit 20 Jun 2008 | Member Level: Gold | Rating: Points: 2 |
Default constructor initializes the variables of your class with default values and the parameterised constructors have some parameters. Each class by default have a default constructor, whereas you create the parameterised constructors e.g: private class Class1 { //Parameterised Constructor public Class1(inta, int b) { } }
Check this link for more info http://www.c-sharpcorner.com/UploadFile/rajeshvs/ConsNDestructorsInCS11122005010300AM/ConsNDestructorsInCS.aspx
|
| Author: Gaurav Agrawal 20 Jun 2008 | Member Level: Diamond | Rating: Points: 2 |
http://www.rupeemail.in/rupeemail/invite.do?in=MTAxNTM0JSMlS0hqblZtUFI0c3BmTmw2azNNVDhyb1dCaA==
Register on this site by this link
|
| Author: chandramohan 21 Jun 2008 | Member Level: Gold | Rating: Points: 1 |
http://www.iam.ubc.ca/guides/javatut99/java/concepts/index.html
http://www.c-sharpcorner.com/UploadFile/eecabral/OOPSand.NET211102005075520AM/OOPSand.NET2.aspx
www.c-sharpcorner.com/UploadFile/eecabral/OOPSand.NET211102005075520AM/OOPSand.NET2.aspx luna2.informatik.uni-osnabrueck.de/alumni/bernd/oops/staff/oops_tutorial.pdf
|
| Author: Arun K 23 Jun 2008 | Member Level: Gold | Rating: Points: 3 |
When you want to give default values then u can use Default construcotor otherwise it you want to give values from outside then you can use parameterised constructor.
|