Preparing for the 0.2 draft
Osvaldo Doederlein
opinali at gmail.com
Sat Jan 30 05:25:17 PST 2010
2010/1/30 Fredrik Öhrström <fredrik.ohrstrom at oracle.com>
> Just because every piece of code in Java you have written so far, has
> been a method inside an object
>
>
Well, there is the enormous exception of all Java code inside static
methods, static initializers, and field-initializing expressions. (The
latter _is_ "code inside an object" because it's compiled into constructors;
but you can't use 'this' anyway.) So, the Java language certainly has long
and extensive tradition of supporting contexts of code where 'this' does not
exist, including contexts where there is no such thing as an enclosing
object.
A+
Osvaldo
More information about the lambda-dev
mailing list