Difference between Enum and Interface?
>> Thursday, May 26, 2011
- Interface doesnot contain any constructors
- Enum act as a class and extend java.lang.Enum,but it cannot other class ,but implements any n.o of interfaces.
- But an interface can extend any n.o Interfaces.
- Java.lang.Enum is base class of all enum's preesent in java.It is an abstract class,it implements Serializable, comparable Interfaces
0 comments:
Post a Comment