Except those can't read nor modify variables in their enclosing scope. Anonymous inner instances are more akin to C's nested functions, which GCC has had for a long time.
Correct me if I'm wrong though (which would only make me very happy); been years since I did Java.