📄 referencetest.java
字号:
package Operator;
import java.awt.Dimension;
/*
The equal (=) sign is used for assigning a value to a variable;
hence, it is called an assignment operator (赋值运算符).
There are actually 12 assignment operators, but the rest are just
amalgams of the equal sign and other arithmetic operators,
as shown in the following:
=、*=、/=、%=、+=、-=、<<=、>>=、>>>=、&=、^=、|=
*/
class ReferenceTest {
public static void main(String[] args) {
Dimension a = new Dimension(5, 10);
System.out.println("a.height = " + a.height);
Dimension b = a;
b.height = 30;
System.out.println("a.height = " + a.height + "after change to b");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -