日期:2014-05-20  浏览次数:20781 次

java错误:the hierarchy of type "类名" is inconsistent
我写了个类

public class J_ActionListener implements ActionListener{
public void actionPerformed(ActionEvent e){
......
}

}


该引入的包都引入了,eclipse提示我错误:the hierarchy of type J_ActionListener is inconsistent
这是哪儿的问题呢?

jdk6.0

------解决方案--------------------
等级类型J_ActionListener不一致
------解决方案--------------------
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Aa implements ActionListener{
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
}
}
我测试了.没有你说的那个错误
楼主看看.是不是哪里不对!
------解决方案--------------------
等级类型不一致 
你实现的接口的时候 用工具自动实现 也许是你自己写错了什么
------解决方案--------------------
肯定是缺包,或者环境有问题。。。