difference between enum and final class?

Ads

 
 

Share on Google+Share on Google+

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

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

Ads
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.


Ads









Related Tutorials/Questions & Answers:
Advertisements

Ads

 
Advertisement null

Ads