File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Abstract Method in enum" Watch "Abstract Method in enum" New topic

Abstract Method in enum

Sandeep Chhabra
Ranch Hand

Joined: Aug 28, 2005
Posts: 340

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?


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:
subject: Abstract Method in enum
jQuery in Action, 3rd edition