回顧一下java的執行順序java
public class Demo {
public Demo() {
super();
System.out.println("this is Demo");
}ide
static {
System.out.println("this is static");
}
{
System.out.println("this is {}");
}
public static void main(String[] args) {
Demo demo=new Demo();
//JobHandler jobHandler=new JobHandlerImpl();
//jobHandler.excute();
/*Handler handler=new Handler() {
@Override
public void handler1() {
System.out.println("3123123123123123123");
}
};
handler.defaultMethod();
Handler.staticMethod();*/
}
}
this is static
this is {}
this is Demo
this