• Post Reply Bookmark Topic Watch Topic
  • New Topic

Did you know enum is reserve keyword in J2SE 1.5?  RSS feed

 
Surendra Kashyap
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Traditionally, I have normally used 'enum' as variable for Enumeration declaration in my classes. However, I discovered that 'enum' is a reserved keyword in J2SE 1.5 that means, need to re-factor the code.

I thought, this is useful information which might be useful when code is migrated to 1.5 environment.

Regards,

Surendra
 
Tony William
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me, I will usually use the common words as a prefix for my variables. In other words, I may have enumFruits, enumMyVar.
 
Surendra Kashyap
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a good idea!

Thanks!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!