📄 aboutobject.java
字号:
package jerryhfb;
public class AboutObject{
public static void main(String args[]){
new AboutObject().test();
}
public void test(){
TestedClass a = new TestedClass();
TestedClass b=a;
System.out.println("beginning:");
System.out.println("attribute of a is "+a.getAttribute());
System.out.println("attribute of a is "+b.getAttribute());
System.out.println("first changes:");
b.setAttribute(30);
System.out.println("attribute of a is"+a.getAttribute());
System.out.println("attribute of b is"+b.getAttribute());
System.out.println("second change:");
a.setAttribute(100);
System.out.println("attribute of a is "+a.getAttribute());
System.out.println("attribute of b is "+b.getAttribute());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -