aboutparameter.java

来自「我自己学习JAVA过程中用键盘敲的代码」· Java 代码 · 共 23 行

JAVA
23
字号
package jerryhfb;
public class AboutParameter{
	public static void main(String args[]){
		AboutParameter aa=new AboutParameter();
		
		
		TestedClass a=new TestedClass();
		System.out.println("begining:");
		System.out.println("attribute of a is "+a.getAttribute());
		
		System.out.println("Send a to math:");
		aa.changeObjectAttribute(a);
		System.out.println("attribute of a is "+a.getAttribute());
	}
		
		public void changeObjectAttribute(TestedClass x){
			System.out.println("at beginning attribute inside function is "+x.getAttribute());
			x.setAttribute(x.getAttribute()*10);
			System.out.println("attribute inside function is "+x.getAttribute());
		}
		
}
	

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?