Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #33804
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: ... |
| Date | Mon, 15 Feb 2016 07:52:56 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 28 |
| Message-ID | <n9shhp$5qe$1@dont-email.me> (permalink) |
| References | <n9sdug$cej$6@reader1.panix.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Mon, 15 Feb 2016 12:50:01 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="2d081e2f7155c28005d4472f67c2f43d"; logging-data="5966"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kwIFuEC5zE4NuWCmZd9lV" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
| In-Reply-To | <n9sdug$cej$6@reader1.panix.com> |
| Cancel-Lock | sha1:5KnAl5S3I/uQ4yfBWo0t5YNyJ2o= |
| Xref | csiph.com comp.lang.java.programmer:33804 |
Show key headers only | View raw
On 2/15/2016 6:48 AM, Popping mad wrote:
> can someone tell me exactly what a constructor like this does?
>
> public Node(Type type, Node... children) {
> this.type = type;
> this.children = children;
> }
We can infer that the class has fields named `type' and
`children', declared in a manner something like
/* qualifiers */ Type type;
/* qualifiers */ Node[] children;
... where /* qualifiers */ may involve things like `private',
`protected', `public', `final', `transient', and so on. (Maybe
even `static', although that would be unusual.) The constructor
sets the class' fields equal to its parameters, so after construction
the class' `type' field has the same value as the `type' parameter,
and the `children' field refers to the same array as the `children'
parameter.
If you're still confused, please describe in more detail just
what you're confused about.
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
... Popping mad <rainbow@colition.gov> - 2016-02-15 11:48 +0000
Re: ... Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-02-15 07:52 -0500
Re: ... Popping mad <rainbow@colition.gov> - 2016-02-15 13:09 +0000
Re: ... Eric Douglas <e.d.programmer@gmail.com> - 2016-02-15 05:14 -0800
Re: ... Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-02-15 08:43 -0500
Re: ... Andreas Leitgeb <avl@logic.at> - 2016-02-15 13:46 +0000
Re: ... Eric Douglas <e.d.programmer@gmail.com> - 2016-02-15 06:03 -0800
Re: ... j4n bur53 <janburse@fastmail.fm> - 2016-02-15 15:54 +0100
Re: ... Eric Douglas <e.d.programmer@gmail.com> - 2016-02-15 07:24 -0800
Re: ... Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-02-15 11:08 -0500
Re: ... Arne Vajhøj <arne@vajhoej.dk> - 2016-02-15 11:17 -0500
Re: ... Andreas Leitgeb <avl@logic.at> - 2016-02-15 16:34 +0000
Re: ... Arne Vajhøj <arne@vajhoej.dk> - 2016-02-15 11:43 -0500
Re: ... Jan Burse <janburse@fastmail.fm> - 2016-02-15 20:44 +0100
Re: ... Jan Burse <janburse@fastmail.fm> - 2016-02-15 20:44 +0100
Re: ... Jan Burse <janburse@fastmail.fm> - 2016-02-15 20:45 +0100
Re: ... Andreas Leitgeb <avl@logic.at> - 2016-02-16 10:05 +0000
Re: ... Arne Vajhøj <arne@vajhoej.dk> - 2016-02-15 21:46 -0500
Re: ... Arne Vajhøj <arne@vajhoej.dk> - 2016-02-15 09:34 -0500
csiph-web