• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Storing static constants

 
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
Marshal
Posts: 34229
341
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic