implements是类实现接口时候用到的关键字 如:
interface Human
{
void run();
void jump();
}
class Man implements Human
{
public void run()
{
System.out.println("短跑");
}
}
implements使用接口的
interface Sport
{
void run();
void jump();
}
class Athlete implements Sport
{
public void run()
{
System.out.println("短跑");
}
public void jump()
{
System.out.println("跳高");
}
public static void main(String[] args)
{
Ahtlete al=new Ahtlete();
al.run();
al.jump();
}
}