File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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?
author & internet detective
Joined: May 26, 2003
Mar 17, 2007 08:02:00
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.
OCA 8 book
How To Ask Questions The Smart Way
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: Storing static constants
Is a CONSTANT to be both final and static?
final static int i =0 Whizlabs says i is variable and i feel it is a constant
Can i use "static" variable as parameters?
Are instances of enums static by default?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015