java?з??????????Щ???
???????????? ???????[ 2013/5/13 10:19:14 ] ????????
????Java??????????????????á?????????????????????в?????????????????????????????????????????κλ?????????
?????????????????????????
????1?????????????????????????????
????2?????????á?
?????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????ü????????????????????????
????Java???????????????????????????????????????????y??е?????????
???????Java????????????У???????????????????
????1??????????????????????????????????????????????????????
????2???????????????????????????????
????3????????????????????????μ??????????????????
package com.action;
public class Test {
private static int i = 1;
private static String s = "string1";
private static String[] ss = { "11"?? "bb"?? "cc" };
private static int j = 10;
public int ii;
static {
System.out.println("?????1");
System.out.println(i);
}
static {
System.out.println("?????2");
}
/**
* @param args
*/
public static void main(String[] args) {
Test t = new Test();
t.changeInt(i);
System.out.println("???int?:" + i + ":::" + j);
t.changeString(s);
System.out.println("???String?1:" + s);
t.changeString2(s);
System.out.println("???String?2:" + s);
t.changeStrings(ss);
System.out.println("??????飺" + ss[0] );
t.changeTest(t);
System.out.println("??????"+t.i);
t.ii = 111;
t.changeTest1(t);
System.out.println(t.ii);
}
public void changeInt(int i) {
i = 10;
j++;
}
public void changeString(String s) {
s = new String("changeString");
}
public void changeString2(String s) {
s.replace("o"?? "a");
}
public void changeStrings(String[] s) {
s[0] = "numberChange";
}
public void changeTest(Test t) {
Test tt = new Test();
tt.i = 100;
t = tt;
}
public void changeTest1(Test t) {
Test tt = new Test();
tt.ii = 1;
t = tt;
}
}
?????????
?????????1
????1
?????????2
???????int?:1:::11
???????String?1:string1
???????String?2:string1
??????????飺numberChange
??????????100
????111
????????????п????ж??????顣
??????
???·???
??????????????????
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