• Post Reply Bookmark Topic Watch Topic
  • New Topic

Storing static constants  RSS feed

 
charishma gottumukkula
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In J2EE, what is the best approach to store static constants?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36446
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same as Java:
public static final String CONST = "constant";

As far as I know, it's ok to use true hard coded constants. It just so happens that you may have multiple copies - for the different JVMs.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!