1 package com.aaa.day3; 2 //接口中的所有方法都必须是public abstract 3 //如果你不声明,那么默认就是pbulic abstract 4 public interface MyInterface { 5 //再借口中,所有的成员变量都是常量 默认修饰符:PUBLIC STATIC FINAL 6 //static:类名,成员调用 7 //fianl:声明变量 就是常量 8 public static final int a = 1; 9 int b = 1; 10 public abstract void method1(); 11 public int meth2(); 12 }