Java Language Specification, 3rd ed. §9.4 Abstract Method Declarations http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html#9.4Every method declaration in the body of an interface is implicitly abstract, so its body is always represented by a semicolon, not a block.Every method declaration in the body of an interface is implicitly public.
自己写个接口,添加个方法 编译后,用eclipse看下 class文件就知道了。
去JDK里面jre下面的lib目录下rt.jar文件就可以看到
An interface declaration introduces a new reference type whose members are classes, interfaces, constants and abstract methods. This type has no implementation, but otherwise unrelated classes can implement it by providing implementations for its abstract methods.翻译如下: //接口声明引入了新的引用类型的成员是类,接口,常量和抽象方法。这种类型没有实现,但在其他无关的类可以通过提供实现其抽象方法的实现它。
http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html#9.4Every method declaration in the body of an interface is implicitly abstract, so its body is always represented by a semicolon, not a block.Every method declaration in the body of an interface is implicitly public.
编译后,用eclipse看下 class文件就知道了。
//接口声明引入了新的引用类型的成员是类,接口,常量和抽象方法。这种类型没有实现,但在其他无关的类可以通过提供实现其抽象方法的实现它。