Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  

difference between enum and final class?



Share on Google+Share on Google+

difference between enum and final class?
1 Answer(s)      5 years and a month 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.