Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   Java (http://siteownersforums.com/forumdisplay.php?f=12)
-   -   What is constructor overloading in java ? (http://siteownersforums.com/showthread.php?t=173420)

Kunal 07-14-2016 11:15 PM

What is constructor overloading in java ?
 
What is constructor overloading in java ?

sashwatmegh 07-24-2016 11:15 PM

The constructor overloading is a way of having more than one constructor which does different tasks.

Claire_Anderson 09-01-2016 12:09 AM

Having more than one constructors but with different set of parameters is called Constructor overloading. Constructors automatically execute in the beginning of the program. Constructor has the same name as the name of the class. It is used for memory allocation and it does not have any return type.
For example;
constructor(int value2, int value2)
constructor(int value1, int value2, int value3)


All times are GMT -7. The time now is 06:18 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.