📄 passtest.java
字号:
/**
* This class can take a variable number of parameters on the command
* line. Program execution begins with the main() method. The class
* constructor is not invoked unless an object of type 'Class1'
* created in the main() method.
*/
public class PassTest
{
float ptValue;
public static void main (String[] args)
{
int val;
PassTest pt=new PassTest() ;
val=11;
System.out.println(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 );
}
private void ChangeInt(int value){
value=55;
}
public void ChangeObjValue(PassTest ref){
ref.ptValue=99f;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -