This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Enum doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Enum doubt" Watch "Enum doubt" New topic
Author

Enum doubt

Geetha Gubendran
Ranch Hand

Joined: Sep 04, 2006
Posts: 72
Hi,

I read that the access modifier for enum is default and public. But I read the below stmnt in some book. So Can I use any of the below modifiers for the enum that is declared within the class?

=========================================================================
An enum declared outside a class must NOT be marked static, final,
abstract, protected, or private.
=========================================================================
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14424
    
  23

Why don't you just try it out? Write a small test program, try to compile it, and see if you get any errors.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Enum doubt