标签:oid pack abs rgs windows bst int public []
package jiechoudemo; /* * 接口中包含抽象类 */ public class jiechoudemo { public static void main(String[] args) { windows.door wd = new zhuozi().new yizi(); wd.close(); } } //写一个接口 interface windows{ public abstract void open(); //抽象类 abstract class door{ public abstract void close(); } } //子类去实现接口 class zhuozi implements windows{ public void open(){ System.out.println("open la"); } class yizi extends door{ public void close(){ System.out.println("close la"); } } }
标签:oid pack abs rgs windows bst int public []
原文地址:http://www.cnblogs.com/yuanyuan2017/p/6561959.html