1、接口用interface来声明 //定义一个动物接口 public interface Animal{ public void eat(); public void travel(); } 2、接口中的方法是抽象方法,抽象不能有方法体,并且接口中的方法默认的访问修饰符为public abstract 3、JDK1.8中,接口中的方法可以被default和static修饰,但是被修饰的方法必须有方法体