difference between enum and final class?
1 Answer(s)      4 years and 8 months ago
Posted in : Java Beginners

what is the difference between enum and final class in java?


View Answers

May 29, 2012 at 5:02 PM

The java.lang.Enum is an abstract class, it is the common base class of all Java language enumeration types. The definition of Enum is:

public abstract class Enum>
 extends Object
implements Comparable, Serializable

All enum types implicitly extend java.lang.Enum.

A final class cannot be extended. A final class implicitly has all the methods as final, but not necessarily the data members.