The type ComplaintDao cannot be a superinterface of ComplaintDaoImpl; a superinterface must be an interface
时间: 2024-05-27 12:10:48 浏览: 113
java eclipse 出现 xxx cannot be resolved to a type 错误解决方法
5星 · 资源好评率100%
This error message is indicating that there is an issue with the inheritance hierarchy of the ComplaintDaoImpl class. In Java, a class can only extend one other class, but it can implement multiple interfaces.
In this case, it appears that the ComplaintDaoImpl class is trying to extend the ComplaintDao interface, which is not allowed because interfaces cannot be used as superclasses. Instead, the ComplaintDaoImpl class should implement the ComplaintDao interface as follows:
public class ComplaintDaoImpl implements ComplaintDao {
// class implementation
}
This will allow the ComplaintDaoImpl class to provide an implementation for all the methods declared in the ComplaintDao interface.
阅读全文