在Java中匿名类有什么用?我们可以说使用匿名类是Java的优点之一吗?

a can only be final here. Why? How can I reassign a in onClick() method without keeping it as priv