File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Enums Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Enums Problem" Watch "Enums Problem" New topic

Enums Problem

Animesh Saxena
Ranch Hand

Joined: Jan 15, 2006
Posts: 62
When i am declaring enums without a class for example consider this class file.

It gives some error in JavaDoc...and where this enum is used in a class. JavaDoc shows some error. Should enums always be in classes even if they are public. Or is there any alternative?

Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
What errors would you be getting?
That's pretty normal code for a simple Enum (they can get a lot more complicated than that).

Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
"some error in JavaDoc" - like what error in JavaDoc?

This is obviously not a SCJD specific question, so I am moving it to Java in General Intermediate.

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
I compiled and ran javadoc on your enum with no problems. That was in the BlueJ IDE. Perhaps it is some other file in your project causing the problem you are experiencing.

From the command line I get:

[ September 02, 2006: Message edited by: Barry Gaunt ]
I agree. Here's the link:
subject: Enums Problem
It's not a secret anymore!