I have made it through several Java books and I am reading another one, and started to wonder about something. Some books illustrate the use of an anonymous inner class to do something (in most cases it's an action listener) and some use known inner classes. Two questions come to mind:
1) Which is the better choice and why?
2) Or do they both have uses where one is preferred over the other?