• Post Reply Bookmark Topic Watch Topic
  • New Topic

Enum doubt  RSS feed

 
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
Sheriff
Posts: 16028
87
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!