Java???и??????????????
???????????? ???????[ 2015/6/16 11:37:08 ] ??????????????? ???????
???????java???????????????????????????????????????????????????????????????????????
class Father
{
static{
System. out.println("???????????????" );
}
{
System. out.println("????????????" );
}
private static String s=print();
public static String print()
{
System. out.println("?????????" );
return "??????????????????" ;
}
public Father()
{
System. out.println("??????ι???????????????" );
show();
}
public void show()
{
System. out.println("????show()????" );
}
}
class Son extends Father
{
static{
System. out.println("??????????????" );
}
{
System. out.println("????????????" );
}
private static int i=1;
private String s="??????г??????" ;
public void show()
{
System. out.println("????show()??????i=" +i);
}
public Son()
{
System. out.println("????????????????" );
show();
}
}
public class TestClassLoadSeq {
public static void main(String[] args)
{
new Son();
}
}
????????????
??????????????????
?????????????
??????????????????
????????????????
??????????ι?????????????
????????show()??????i=1
????????????????
????????????????????
???????????????????????s=??????г??????
????????show()??????i=1
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11