The definition and instantiation of an anonymous class uses one of the expressions shown in Figure 1.
Usually, this expression is included inside a larger overall expression, such as an argument to a method call.
Figure 1. The definition and instantiation of an anonymous class. |
---|
new className(optional argument list){ classBody } new interfaceName(){ classBody } |
File: aw.htm | [Next] | [Prev] |