A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
EJB and other Java EE Technologies
Storing static constants
Joined: Nov 06, 2006
Mar 16, 2007 17:56:00
, what is the best approach to store static constants?
Joined: May 26, 2003
Mar 17, 2007 08:02:00
Same as Java:
public static final
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.
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
rocket mass heater
subject: Storing static constants
Are instances of enums static by default?
final static int i =0 Whizlabs says i is variable and i feel it is a constant
Can i use "static" variable as parameters?
Is a CONSTANT to be both final and static?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013