Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #30555 > unrolled thread

Re: closures

Started byEric Sosman <esosman@comcast-dot-net.invalid>
First post2014-12-12 18:05 -0500
Last post2014-12-13 08:53 +0100
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: closures Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-12-12 18:05 -0500
    Re: closures Brixomatic <brixomatic@yahoo.com> - 2014-12-13 08:53 +0100

#30555 — Re: closures

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2014-12-12 18:05 -0500
SubjectRe: closures
Message-ID<m6fsbl$i23$1@dont-email.me>
On 12/12/2014 5:51 PM, Stefan Ram wrote:
>    flabbergasted
>
>    Today, I wanted to show to the students that inner classes cannot
>    modify fields of outer classes. [...]

     There's no such prohibition, and I don't think there ever has been.
Perhaps you're confusing "fields of outer classes" with "local variables
of enclosing methods?"

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

[toc] | [next] | [standalone]


#30560

FromBrixomatic <brixomatic@yahoo.com>
Date2014-12-13 08:53 +0100
Message-ID<MPG.2ef60ee728c4a60d98969d@news.aioe.org>
In reply to#30555
In article <m6fsbl$i23$1@dont-email.me>, Eric Sosman (esosman@comcast-
dot-net.invalid) says...
> 
> On 12/12/2014 5:51 PM, Stefan Ram wrote:
> >    flabbergasted
> >
> >    Today, I wanted to show to the students that inner classes cannot
> >    modify fields of outer classes. [...]
> 
>      There's no such prohibition, and I don't think there ever has been.
> Perhaps you're confusing "fields of outer classes" with "local variables
> of enclosing methods?"

Or did you mean a static inner classe trying to modify a non static 
field of the outer class?

Kind regards,
-Wanja-


-- 
..Alesi's problem was that the back of the car was jumping up and down 
dangerously - and I can assure you from having been teammate to 
Jean Alesi and knowing what kind of cars that he can pull up with, 
when Jean Alesi says that a car is dangerous - it is. [Jonathan Palmer]

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web