An anonymous class is a kind of syntactic shorthand that lets you instantiate a class implementing an abstract class or interface where you need it, without having to explicitly give it a class name.
匿名类是一种语法速写标记,使您能够在需要实现某个抽象类或者接口的地方创建一个类的实例,而不需要显式提供类的名称。
Anonymous types allow you to define a class, then declare and initialize an object of that class, without giving the class a name.
匿名类型允许您定义一个类,然后在不给出类名称的情况下声明并初始化该类的对象。
应用推荐