Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #28881
| From | Peter <mcheung63@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Assumed final? |
| Date | 2014-07-01 18:54 +0800 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <lou416$3a5$1@speranza.aioe.org> (permalink) |
| References | <los6o2$e1d$1@dont-email.me> <losa30$abh$1@dont-email.me> |
於 1/7/14上午2:25, markspace 提到: > On 6/30/2014 10:28 AM, Knute Johnson wrote: > >> So it appears that the Java 8 compiler has gotten smarter or I haven't >> been paying enough attention :-). >> > > Gotten smarter, I think. This was added for Java 8 lambdas. So now > instead of having to declare you variables final for anonymous inner > classes/lambdas, the compiler can figure out if it is "effectively > final" (note the text of your error message) and just assume you meant > "final". > > Handy for lambdas because it makes them less verbose in some situations > and a bit more like their aged cousins, closures. nice
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Assumed final? Knute Johnson <eternal@knutejohnson.com> - 2014-06-30 10:28 -0700
Re: Assumed final? markspace <markspace@nospam.nospam> - 2014-06-30 11:25 -0700
Re: Assumed final? Peter <mcheung63@gmail.com> - 2014-07-01 18:54 +0800
csiph-web