This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Abstract Method in enum Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Abstract Method in enum
 
Similar Threads
enums
question on enum
Enum optional semicolon
Constructor in enum
switch on a string?