garagedoor.java

来自「深入浅出设计模式」· Java 代码 · 共 30 行

JAVA
30
字号
package headfirst.command.remote;public class GarageDoor {	String location;	public GarageDoor(String location) {		this.location = location;	}	public void up() {		System.out.println(location + " garage Door is Up");	}	public void down() {		System.out.println(location + " garage Door is Down");	}	public void stop() {		System.out.println(location + " garage Door is Stopped");	}	public void lightOn() {		System.out.println(location + " garage light is on");	}	public void lightOff() {		System.out.println(location + " garage light is off");	}}

⌨️ 快捷键说明

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