📄 observableint.java
字号:
import java.util.*;public class ObservableInt extends Observable { int value; // The value everyone wants to observe public ObservableInt() { } public ObservableInt(int newValue) { value = newValue; } public synchronized void setValue(int newValue) { // // Check to see that this call is REALLY changing the value // if (newValue != value) { value = newValue; setChanged(); notifyObservers(); } } public synchronized int getValue() { return value; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -