Is it more practical to create a class named say, "Constants.java", and declare all the magic constants being use by the whole program, or put everything in properties file named ScreenMessage.properties? Values returned by Constants.java and in Properties file will be use to find a specific message from the database.
Example:
In Constants.java:
public static final String UNSUCCESSFUL_LOGIN = "MSGID001";
In ScreenMessage.properties:
UNSUCCESSFUL_LOGIN=MSGID001
[Added: 2013-May-18]: Actually, the nature of this question is: if I put the Magic Constants in Constants.java, I can retrieve the constant's value by simply "Constants.UNSUCCESSFUL_LOGIN", but if I use properties file, I am embedding again another constant in the program because of the file name of the properties file, and it is more harder if the properties file is not in the same package than that of the class that will load the values of the properties file.