rectangle.java
来自「《深入浅出设计模式》的完整源代码」· Java 代码 · 共 20 行
JAVA
20 行
package prototype;public class Rectangle implements prototype,Command { public Object Clone() { Object clone=null; try{ clone=super.clone(); } catch(CloneNotSupportedException exception){ System.err.println("Clone not support"); } return clone; } public String GetName() { return "Retangle"; } public void Draw(){ System.out.println("Draw a rectangle"); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?