local variable a is accessed from within inner class; needs to be declared final