I'm a bit confused about line being 2 an error due to method clone() being declared final in Enum class, as solution says.
Code: Select all
public enum EnumB{ B, BB, BBB;
public Object clone(Object o){ return B; } //2
}
Is the option 2 actually correct despite of this? If it is so, why?
Thank you