a
- abstract class AbstractDemo1 {
- AbstractDemo1(){}
- private int i = 3;
- public void show(){
- System.out.println("Abstract Demo!!"+i);
- }
- }
- public class AbstractDemo{
- public static void main(String[] args) {
- AbstractDemo1 a = new AbstractDemo1(){};
- a.show();
- }
- }
复制代码
|
|