java设计模式|原型模式
原型模式
package prototype;
public class PrototypeTest {
public static void main(String[] args) throws CloneNotSupportedException {
BaseInfo baseInfo = new BaseInfo("xxx");
Product product = new Product("part1","part2",3,4,baseInfo);
Product clone= (Product) product.clone();
System.out.println("original:"+product);
System.out.println("clone:"+clone);
product.
java设计模式|原型模式最先出现在Python成神之路。
共有 0 条评论