0
public class Officepersonel extends Personel {

 int workidno;String name,surname;
public Officepersonel(String name,String surname, int kimlikno, final int workidno)
{
    super(name,surname,kimlikno,workidno);
}

private void showcard(final int workidno)
{
    System.out.println("Nameim, "+name+"Surnameim "+surname+": Kartimi okutuyorum.");
}

@Override
public void goWorkCome( int workidno)
{

    super.goWorkCome( workidno);
    showcard(workidno);


}

}

public class Personel extends Insan {

 String name,surname;   int workidno;

public Personel(String name,String surname, int kimlikno,final int workidno)
{
    super(name,surname,kimlikno);


}




public void goWorkCome( int workidno)
{

    System.out.println("Nameim, "+name+"Surnameim "+surname+": Ise gidiyorum.\nIsten geliyorum");

}

你好。我在这段代码中遇到错误。

officePersonel 类型的方法 goworkcome(int) 必须覆盖或实现它所说的超类型方法。我已经压倒一切了。

对于 officvePersonel 类型,方法 showcard(int) 未定义

这些课程位于不同的页面中,因此哪个是第一个没有问题。

4

1 回答 1

0

Add or Change your jre to javaJRE-1.6

Eclipse -> Properties -> Java Build Path -> Libraries -> add library ....

this may work!

于 2013-07-17T09:52:09.873 回答