当前位置: 技术问答>java相关
一个怪问题:为什么下面程序总报“不能解析方法”的错误?
来源: 互联网 发布时间:2017-03-21
本文导语: 感谢csdn高手,请参见: http://www.javaresearch.org/forum/thread.jsp?column=16&thread=3708 | An abstract method declaration introduces the method as a member, providing its signature (name and number and type of parameters),...
感谢csdn高手,请参见:
http://www.javaresearch.org/forum/thread.jsp?column=16&thread=3708
http://www.javaresearch.org/forum/thread.jsp?column=16&thread=3708
|
An abstract method declaration introduces the method as a member, providing its signature (name and number and type of parameters), return type, and throws clause (if any), but does not provide an implementation. The declaration of an abstract method m must appear directly within an abstract class (call it A);
你定义了一个抽象的方法,所以你的类也必须是抽象类。
public abstract int compareTo (DbValue dbvalue);
你定义了一个抽象的方法,所以你的类也必须是抽象类。
public abstract int compareTo (DbValue dbvalue);