local inner class can't have an access specifier because it is not part of the outer class, but have access to the final variables in the current code block and all the members of the enclosing class. And the anonymous inner class cannot have a named constructor but only an instance initializer such as
return new anonymousClass { { print("instance initializer"); }...}