Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 633581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:12:08+00:00 2026-05-13T20:12:08+00:00

From past Year are so, we have developed an application, in which we have

  • 0

From past Year are so, we have developed an application, in which we have used the static String Constants to store the Constants.
Like
public static final String PAYMENT_CHEQUE = “cheque”;
Where Ever I Require i.e. in the jsp pages as well the Action class I will be refering to the Above String Constant
I am thinking after reviewing the Resource Bundle, properties Files, My Question is

  1. Is there any performance hit if I
    use the properties file compared to
    Static String Constant?
  2. Which is better Static string
    constant and Properties File Key
    Value pair?
  3. Is that good idea id we use the
    static String Constant(For Labeling)
    in the jsp?

Please suggest me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:12:08+00:00Added an answer on May 13, 2026 at 8:12 pm

    In general, using hard-coded strings is a bad idea, because it means every change needs a new compilation-deployment cycle, whereas using a properties file means the application needs to be restarted and nothing else (although some would say that in itself is a high price to pay). Another advantage of using a properties file is the ability to switch languages by switching the application to another file – much more reasonable than having multiple sets of constant labels in code.

    You can use the final static String fields the same way you do right now, only give them a value read fro ma properties file at the application’s initialization stage, rather than going back to the file for every constant (which would be costly!). That way you don’t have to make application-wide changes, and you still enjoy the advantages I mentioned above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been coding application from past 1 year, However first time I came
I'm trying to select records which have a recdate within the past year $goodate
I have 2 separate Liferay Instances, say Instance A which I was running from
I have been developing a new online game for the past year now. The
I've been parsing poker hand histories for the past year and have learned quite
I have taught myself a lot of Objective-C over the past year and a
from the past few days i have been following a lot of tutorials regarding
I have looked around for the past year to put tide predictions on a
I remember from past having a utility that would allow to leak various system
I am struggling from past 1 week that how to compile the tesseract ocr

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.