aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Abstract Method in enum Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Abstract Method in enum" Watch "Abstract Method in enum" New topic
Author

Abstract Method in enum

Sandeep Chhabra
Ranch Hand

Joined: Aug 28, 2005
Posts: 340
Hi,

When we declare some abstract method in a class, we need to make the class abstract. but when we declare an abstract method in an enum we need not do it.



Why is it so?

Sandy


Regards<br />Sandy<br />[SCJP 5.0 - 75%]<br />[SCWCD 1.4 - 85%]<br />------------------<br />Tiger, Tiger burning bright,<br />Like a geek who works all night,<br />What new-fangled bit or byte,<br />Could ease the hacker's weary plight?
Joseph Clark
Ranch Hand

Joined: Sep 10, 2005
Posts: 48
the Enum type is implicitly abstract, like a Java interface.

The signature is:

public abstract class Enum<E extends Enum<E>> extends Object implements Comparable<E>, Serializable
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract Method in enum
 
Similar Threads
enums
switch on a string?
Constructor in enum
question on enum
Enum optional semicolon