日期:2014-05-18 浏览次数:20820 次
public class A {
public static void main(String[] args) {
String a="af";
TE te=new TE();
BB bb=new BB();
te.test(a);
te.test1(bb);
System.out.println(a);
System.out.println(bb.getB());
}
}
class TE{
public String test(String a){
a="1";
return a;
}
public String test1(BB bb){
String a="1";
bb.setB(a);
return a;
}
}
class BB{
private String a;
private String b;
public String getA() {
return a;
}
public void setA(String a) {
this.a = a;
}
public String getB() {
return b;
}
public void setB(String b) {
this.b = b;
}
}