public class Car implements Cloneable{
private String name;
private int price;
Car(String name, int price)
{
this.name = name;
this.price = price;
}
//copy constructor 1
Car(Car a)
{
price = a.price;
name = a.name;
}
clone(Car a)
{
Car newC = Car(Car a);
}
}
Car a gives me cannot find symbol. I am trying to write a class that uses a copy constructor and a clone method, but came across an error I can't solve. I've been scratching my head for 30 minutes.