Annoymous Inner Classes
I pondering why use Annoymous Inner Classes for anything rather than GUI events so after a quick search I found this article, Readers ponder the virtues (and defects) of annoymous classes. This poll indicates that most readers of the site think Annoymous Inner Classes are good when they are small but not liked if they are big.
Then looking at the sun tutorial I found this information:
" An anonymous class is generally used inside an expression and it does not have member scope, since it isn't visible to the enclosing class. Anonymous classes can make code difficult to read. You should limit their use to those classes that are very small (no more than a method or two) and whose use is well understood, such as event-handling classes."
0 Comments:
Post a Comment
<< Home