News for hackers. Stuff that matters.
Re:Java finally getting closures, method handles and traits ... by SeanLuke on Sunday January 23, 2011 @09:59PM (#2134072)
There's a hack. Instead of declaring a local variable like "final double d = 4;", you can declare it "final double[] d = new double[] { 4 };" Then you can freely modify the 4 to something else inside the anonymous class. Why Sun didn't just bake that into the compiler instead of requiring a hack is beyond me.

There are no comments on this comment yet.