/**
* <p>
* 类描述
* <p>
*
* 所属插件:com.macrosan.pool
* @author chizhandong 2015-5-10
*
*/
public class Demo {
private int data = 10;
private String dataSringString;
public Demo(int data,String aaString){
this.setData(data);
setDataSringString(aaString);
}
this.data = data;
}
public int getData() {
return data;
}
public static void fuck(int data){
data = 250;
}
public static void fun(String a){
a = "fuck";
}
public static void star(Demo demo){
demo.setData(250);
}
public static void war(Demo demo){
demo.setDataSringString("fuck");
}
public void setDataSringString(String dataSringString) {
this.dataSringString = dataSringString;
}
public String getDataSringString() {
return dataSringString;
}
public static void main(String args[]){
int a = 1000;
fuck(a);
System.out.println(a);
String aa = "aaaa";
fun(aa);
System.out.println(aa);
Demo demo = new Demo(10,"222");
System.out.println(demo.getData());
System.out.println(demo.getDataSringString());
fuck(demo.getData());
fun(demo.getDataSringString());
System.out.println(demo.getData());
System.out.println(demo.getDataSringString());
star(demo);
war(demo);
System.out.println(demo.getData());
System.out.println(demo.getDataSringString());
}
}
输出结果
1000
aaaa
10
222
10
222
250
fuck