帮偶看看这个程序有什么错误?
import java.io.*;
class PassTest{
float ptValue;
PassTest(){
value=10;
}
public void changeObjValue(PassTest ref){
ref.ptValue=99f;
}
}
class Pass{
public static void main(String args[])
{
int val;
PassTest pt=new PassTest();
val=11;
System.out.println("Original Int Value is:"+val);
pt.changeInt(val);
System.out.println("Int Value after Change is:" +val);
pt.ptValue=101f;
System.out.println("Original ptValue is:"+pt.ptValue);
pt.changeObjValue(pt);
System.out.println("ptValue after Change is:"+pt.ptValue);
}
}
编译不能通过!提示有好多个错误!请帮小女子一下,看到底有什么错?