📄 adventure.java.bak
字号:
//:c08: Adventure.java
import java.util.*;
interface CanFight
{
void fight();
}
interface Canswim
{
void swim();
}
interface Canfly
{
void fly();
}
interface ActionCharacter
{
public void fight(){}
}
class Hero extends ActionCharacter implements CanFight,Canswim,Canfly
{
public void swim(){};
public void fly(){};
}
public class Adventure
{
static void t(CanFight x){x.fight();}
static void u(Canswim x){x.swim();}
static void v(Canfly x){x.fly();}
static void w(ActionCharacter x){x.fight();}
public static void main(String [] args)
{
Hero h=new Hero();
t(h);
u(h);
v(h);
w(h);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -