首页 > 题库 > 学历提升 > 自学考试 > 自考本科 > 案例题

阅读程序,写出该程序的输出结果。
public class Test29{
float m_float;
void change(int pi){pi=100;}
void change(String ps){
ps=new String("Right");
}
void change(Test29 po){
po.m_float=100.0f;
}
public static void main(String[] args) {
Test29 pt = new Test290;
int i= 22;
pt.change( i);
System.out.printn("i value is "+ i);
String s= new String( "Hello" );
pt.change(s);
System.out.printIn("s value is "+ s);
pt.m_ float = 22.0F;
pt.change( pt );
System.out.printn("Current pt.m. float is " + pt.m_ floa);
}
}


参考答案: 查看答案 查看解析 下载APP畅快刷题

相关知识点试题

相关试卷