interface annimal
{
void movement();
void habits();
}
class bird implements annimal
{
public void movement()
{
System.out.println("我有翅膀,我会飞,是鸟类");
}
public void habits()
{}
}
class beast implements annimal
{
public void movement()
{
}
public void habits()
{
System.out.pritnln(" 我用自己的乳汁喂养后代,我吃肉,我是兽");
}
}
class bat implements annimal
{
public void movement()
{
System.out.println("我有翅膀,我会飞,是鸟类");
}
public void habits()
{
System.out.pritnln(" 我用自己的乳汁喂养后代,我吃肉,我是兽");
}
} |