Java???????????
???????????? ???????[ 2014/10/13 10:01:44 ] ????????Java ???????
??????????????У??????????????????????????(?????е?????-??-)??????????????????????????Java?????????????????????????????????????????д?????????к?????System.out.println?????????????г???????????????????System.out.println????????????o?????????????????
????????????????????壬????????????????????????????A????B???????????????????飬?????????????????飬???????????????????????????????A?????B????????????A?????????????????????
????????????????????o??????д?????СDemo????????????????????????????????????£?
Class B:
public class B{
//???????
static int i=1;
//???????
static {
System.out.println("Class B1:static blocks"+i);
}
//????????
int j=1;
//???????
static{
i++;
System.out.println("Class B2:static blocks"+i);
}
//??????
public B(){
i++;
j++;
System.out.println("constructor B: "+"i="+i+"??j="+j);
}
//????????
{
i++;
j++;
System.out.println("Class B:common blocks"+"i="+i+"??j="+j);
}
//????????
public void bDisplay(){
i++;
System.out.println("Class B:static void bDisplay():"+"i="+i+"??j="+j);
return ;
}
//???????
public static void bTest(){
i++;
System.out.println("Class B:static void bTest():"+"i="+i);
return ;
}
}
??????
???·???
??????????????????
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