Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Properties file v/s Constants in Java

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Report post to moderator
Consider the scenario that you have some strings in your application. Whose value may change some time in future.

What would be the best possible solution for this?
Using properties file and loading them through resource bundle
or
Using a java class which contains public static final strings for the changing values.

Which one is better and why?

Thanks
 
Bartender
Posts: 9620
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not crosspost the same question to multiple forums. Follow-up in the post in the Java In General - Intermediate forum.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic