Cloning using a copy factory

suggest change
public class Sheep {

    private String name;
    private int weight;
    public Sheep(String name, int weight) { = name;
        this.weight = weight;
    public static Sheep newInstance(Sheep other);
        return new Sheep(, other.weight)


Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents