Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enum doubt

 
Geetha Gubendran
Ranch Hand
Posts: 75
  • 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
Posts: 15203
36
Android IntelliJ IDE Java Scala Spring
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic