- class Demo3_Interface {
- public static void main(String[] args) {
- System.out.println("Hello World!");
- }
- }
- interface InterA {
- public abstract void printA();
- }
- interface InterB {
- public abstract void printB();
- }
- interface InterC extends InterB,InterA {
- }
- //class Demo implements InterA,implements InterB { //这么做不允许是非法的
- class Demo extends Object implements InterA,InterB {
- public void printA() {
- System.out.println("printA");
- }
- public void printB() {
- System.out.println("printB");
- }
- }
接口生成class文件吗??内存怎样的
|
|