且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

错误:'新建不能在界面上使用'

更新时间:2023-02-04 12:59:53

如果 listViewPrinter 是一个接口,你无法初始化它。

你只能初始化类。
If listViewPrinter is an interface, you cannot initialize it.
You can only initialize classes.


你不能当然,创建一个接口的实例。您必须创建实现此类接口的类的对象(或调用方法,可能共享,返回实现此类接口的类的实例)。
You cannot create an instance of an interface, of course. You have to create an object of a class implementing such interface (or call a method, maybe shared, returning an instance of a class implementing such interface).