Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

Properties file v/s Constants in Java

 
aparna chi
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
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X 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.
 
Hey cool! They got a blimp! But I have a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!