An anonymous class is pretty much just a way to extend a class or implement an interface without having to create a whole new class.
Use them if you need to use a local class only once.
The syntax of an anonymous class expression is like the invocation of a constructor, except that there is a class definition contained in a block of code.
Use them if you need to use a local class only once.
The syntax of an anonymous class expression is like the invocation of a constructor, except that there is a class definition contained in a block of code.
No comments:
Post a Comment