- abstract class jzl
- {
- private jzl(){};
- public abstract void day();
- public abstract void day2();
- public void day3()
- {
- System.out.println("123456789");
- }
- public static jzl a=new jzl(){
- public void day()
- {
- // TODO Auto-generated method stub
-
- }
- public void day2()
- {
- // TODO Auto-generated method stub
-
- }
-
- };
-
- }
- public class Demo4
- {
- /**
- * @param args
- */
- public static void main(String[] args)
- {
- // TODO Auto-generated method stub
-
-
- jzl.a.day3();
- }
- }
复制代码
new出来的那个是什么?内部类吗?为什么还要覆写抽象类中的方法? |
|