⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 abstractspoon.java

📁 仅学习使用
💻 JAVA
字号:
package prototype;

public abstract class AbstractSpoon implements Cloneable {
	String spoonName;
	public void setSpoonName(String spoonName) {
		this.spoonName = spoonName;
	}
	public String getSpoonName() {
		return this.spoonName;
	}
	public Object clone() {
		Object object = null;
		try {
			object = super.clone();
		}catch (CloneNotSupportedException exception)
		{System.err.println("AbstractSpoon is not Cloneable"); }
		return object;
	}
}

class SoupSpoon extends AbstractSpoon {
	public SoupSpoon() { setSpoonName("Soup Spoon"); }
}

class SaladSpoon extends AbstractSpoon {
	public SaladSpoon() { setSpoonName("Salad Spoon"); } 
} 

⌨️ 快捷键说明

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