Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34471
| Path | csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Arne Vajhøj <arne@vajhoej.dk> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Why is it called "default constructor"? |
| Date | Sat, 4 Jun 2016 15:34:52 -0400 |
| Organization | Aioe.org NNTP Server |
| Lines | 27 |
| Message-ID | <nivagu$14oh$1@gioia.aioe.org> (permalink) |
| References | <default-constructor-20160604183650@ram.dialup.fu-berlin.de> |
| NNTP-Posting-Host | 7SK6yTFfqwlIPNBLl3l7Qg.user.gioia.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com comp.lang.java.programmer:34471 |
Show key headers only | View raw
On 6/4/2016 1:39 PM, Stefan Ram wrote: > When a constructor is implicitly declared, it often has no > parameters and it often is called »default constructor«. > > »Default« means »used when something is missing«. > > So, why is it called »default constructor«? > > A - Because it has no parameters and therefore it is > used when /arguments/ are missing. > > B - Because it is implicitly declared and therefore it is > used when an /explicit declaration/ is missing > > ? #B is the terminology in Java. #A is the terminology in C++. I would use the term according to the above, but when seeing the term I would be aware that it could have the other meaning. Arne
Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread
Re: Why is it called "default constructor"? Arne Vajhøj <arne@vajhoej.dk> - 2016-06-04 15:34 -0400
csiph-web