Java???????????
???????????? ???????[ 2014/10/13 10:01:44 ] ????????Java ???????
Class A:
public class A extends B{
//???????
static int i=1;
//???????
static {
System.out.println("Class A1:static blocks"+i);
}
//????????
int j=1;
//???????
static{
i++;
System.out.println("Class A2:static blocks"+i);
}
//??????
public A(){
super();
i++;
j++;
System.out.println("constructor A: "+"i="+i+"??j="+j);
}
//????????
{
i++;
j++;
System.out.println("Class A:common blocks"+"i="+i+"??j="+j);
}
//????????
public void aDisplay(){
i++;
System.out.println("Class A:static void aDisplay(): "+"i="+i+"??j="+j);
return ;
}
//???????
public static void aTest(){
i++;
System.out.println("Class A:static void aTest(): "+"i="+i);
return ;
}
}
Class ClassLoading :
public class ClassLoading {
public static void main (String args[]) {
A a=new A();
a.aDisplay();
}
}
???????????н???????
?????????????????????????????????java???????????????
?????????????A?????????????丸??B(Object)??????????????????(????????????е???????)??
?????????????????A?????????????????顣(????1??2??????????1??)
???????????????A??????????丸??B???????????????????丸??B??????????????????????B?е??????????????????.??????????B?е?????????????
????????????ε?????A?е??????????????????.?????A?е?????????????( ????3??4?????????????)
??????????????????????????????????????????????????????У??????????е??????????У?????????????????????????????????????(??????????????)????????????????????????????????á?
????OK????????????????е??????????д?????????????????????????????лл??
??????
???·???
??????????????????
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