Cannot define a constructor

Unlike a local class, an anonymous class cannot define a constructor.

An anonymous class can define an instance initializer, which can provide some of the benefits of a constructor.

(A primary shortcoming of an instance initializer, as compared to a constructor, is that an instance initializer cannot accept incoming parameters.)

If you need to use a constructor when you instantiate the class,

File: aq.htm [Next] [Prev]