题目内容
classFoo{
privateintx;
publicFoo(intx){this.x=x;}
publicvoidsetX(intx){this.x=x;}
publicintgetX(){returnx;}
}
publicclassGamma{
staticFoofooBar(Foofoo){
foo=newFoo(100);
returnfoo;
}
publicstaticvoidmain(String[]args){
Foofoo=newFoo(300);
System.out.print(foo.getX()+-);
FoofooFoo=fooBar(foo);
System.out.print(foo.getX()+-);
System.out.print(fooFoo.getX()+-);
foo=fooBar(fooFoo);
System.out.print(foo.getX()+-);
System.out.prmt(fooFoo.getX());
}
}
Whatistheoutputofthisprogram?()
查看答案
搜索结果不匹配?点我反馈