I am trying to complete a project, and although I tried, I cannot do it. Here's the listing:
public enum Symbols { SEVEN(12,"images/seven.jpg"), WATERMELON(10,"images/watermelon.jpg"), ORANGE(8,"images/orange.jpg"), PLUM(6,"images/plum.jpg"), LEMON(4,"images/lemon.jpg"), CHERRY(2,"images/cherry.jpg"); private int payout;
Now I can go into main and create a character named "s" as follows:
Symbols s = Symbols.CHERRY;
But I had problems creating a copy of "s" using the created copy constructor:
Symbols t = Symbols(s);
If I try to do this, I get an error: "The characters (characters) of the method are undefined for characters of type."
thanks
source share