graphic.java
来自「java的23中设计模式的代码实现」· Java 代码 · 共 28 行
JAVA
28 行
/*
* An Abstract Graphic Class ( Prototype )
*/
import java.lang.*;
import java.io.*;
public abstract class Graphic implements IGraphic {
private String name;
public Object clone() {
try {
return super.clone();
} catch (CloneNotSupportedException e){
System.out.println("Do not support clone !!!");
throw new InternalError();
}
}
public String getName() {
return name;
}
public void setName(String gName) {
name = gName;
}
public abstract void DoSomething();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?