Hello,i have two beginner's questions.
1- Can an interface have some fields(i mean variables)?Or the only thing it contains are prototypes of methods?
2-When we want a method to receive no arguments at all how do we state it?I tried to write void,but the compiler says <identifier> expected
Here is the code
package airplane; public interface AirplaneInterface { boolean taxi(String taxiway); boolean takeoff(String runway); boolean approach(String runway); boolean land(String runway); void setEngines(boolean on); boolean changeAltitude(int factor); int getAltitude(void); }