Properties file or a Constants Class 2005-01-12 - By Darryl Pierce
Back On Wed, 12 Jan 2005 13:43:11 +0530, KR Kumar <Raghavendra.Kopalle@(protected)> wrote: > Is it better to use a Constants java class and declare all the constants or > use a key value pair properties file backed by a Properties class?
It completely depends on the situation and your needs. Are they truly constants; i.e., they will never, ever change? Then put them in an interface and leave them there. If they can be changed, or they're default values which might be changed for such things as the inversion of control pattern, then they naturally would go into a properties file.
-- Darryl L. Pierce <mcpierce@(protected)> Visit the Infobahn Offramp: <http://mcpierce.mypage.org>
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|