abstract class Animal
{
private String color;
private String name;
public void eat()
{
private String food="";
return;
}
public abstract void run(){}
private abstract void fly();
}
我是初学者,希望高手解答!
public interface Interface
{
public abstract void ArrayStack ();
public abstract boolean isEmpty();
public abstract void makeEmpty();
public abstract void top();
public abstract void pop();
public abstract void topAndPop();
public abstract void push();
public static final int DEFAULT_CAPACITY = 10;
}
首先interface是JAVA的关键字你怎么能用它来当接口名呢,并且定义一个接口要独立出来,怎么能出现在类里面呢,
theArray = new int[DEFAULT_CAPACITY]; 数组那来一个默认长度啊.
本回答被网友采纳