SCJP 1.4
setTitle(java.util.ResourceBundle.getBundle("suncertify/MyProj").getString("application.title"));
I actually prefer to use an interface to declare all of my constants, as opposed to a class. Just a style thing.
For me, the big point is that String values should not be found in the body of code. String values are not 'type-checked', which is of huge significance in any sized project, they are often used in different places by different users, which can cause confusion, and they often need to change, so having them all defined in one place makes sense.
You should take my advice. I have a Science degree, and my concentration was String theory.
Item 17: User interfaces only to define types
...
The constant interface pattern is a poor use of interfaces.
(explanation follows in two pages)
...
-Sam Codean<br />SCJP 1.4 (98%)<br />SCJD 5.0 (87.5%)
...
must have only one properties file
...
...
configuration information must be stored in a file called suncertify.properties
...
SCJP 1.4
McFinnigan? Never heard of him. Nobody here but us chickens...<br /> <br />SCJP for Java 1.4<br />SCJD for Java 5.0
Originally posted by Keith Jones:
Please tell me that we can use the java.util.Properties class to do the reading and writing from our properties file(s).
42
SCJP 1.4
SCJP 1.4
Thank you my well lotioned goddess! Here, have my favorite tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|