Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > Java

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 07-14-2016, 11:15 PM   #1
Kunal
Registered User
 
Join Date: Feb 2016
Posts: 73
What is constructor overloading in java ?

What is constructor overloading in java ?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Kunal is offline   Reply With Quote

Old 07-24-2016, 11:15 PM   #2
sashwatmegh
Registered User
 
Join Date: Apr 2016
Location: pune
Posts: 583
The constructor overloading is a way of having more than one constructor which does different tasks.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
sashwatmegh is offline   Reply With Quote
Old 09-01-2016, 12:09 AM   #3
Claire_Anderson
Registered User
 
Join Date: Aug 2016
Posts: 40
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)
__________________
Claire

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Claire_Anderson is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Learning java mikeee741 Java 17 04-16-2017 11:13 PM
Have you ever wondered what is inside a java class file? cianfie Java 6 01-28-2015 11:09 PM
The conclusion provided by the Black Hat Java Script andrebreton2121 Search Engine Optimization 6 10-17-2012 11:06 PM
biggest teature of String in java? cianfie Java 0 12-08-2011 09:03 PM


All times are GMT -7. The time now is 09:30 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.