java运行显示没有启动项
具体代码如下:
public class JieKouCeShi {
public static void mian(String[] args) {
DaJiang D=new DaJiang();
D.fly();
D.AutomaticShutdown();
D.FLY_HEIGHT();
}
}
interface Volant{//接口一:飞行接口,只要实现该接口的都是飞行器
int FLY_HEIGHT=1000;//定义最高飞行高度1000,
void fly();
}
interface Charge{//接口二:充电接口,用于飞行器充电
void AutomaticShutdown();//自动关机设置
}
class DaJiang implements Volant,Charge{//大疆飞行器实现类
public void AutomaticShutdown() {
System.out.println("电量低于10%则提示需要充电");
}
public void fly() {
System.out.println("不考虑天气温差气候等影响,无影响可飞行高度达到1000");
}
public void FLY_HEIGHT() {
System.out.println("最高飞行高度1000");
}
}
问题如下:
你的main拼错了,写成mian了
public static void mian(String[] args) {
改为
public static void main(String[] args) {
就可以了
热门标签: