Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enum doubt

 
Geetha Gubendran
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you just try it out? Write a small test program, try to compile it, and see if you get any errors.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic