?? light.java
字號:
// Introduced in Chapter 3/** A light bulb. */public class Light { /** Whether the Light is on. */ private boolean on; /** A Light is off by default. */ public Light() { on = false; } /** Return true if the Light is on. */ public boolean isOn() { return on; } /** Set whether the Light is on. */ public void setOn(boolean on) { this.on = on; } public String toString() { if (on) { return "O"; } else { return "."; } }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -