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

  • SEARCH
  • Home
  • 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 8924933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:33:34+00:00 2026-06-15T07:33:34+00:00

I have a class called Info , and i have a bunch of static

  • 0

I have a class called Info, and i have a bunch of static String variables described in it.

public class Info{

    public static stringOne= "Hello";
    public static stringTwo = "world";

}

and i’m hoping to access these variables as Info.stringTwo from other classes.

1.) I need to know if this is java-Internationalization that i have applied here ? (I have all the messages that i will display in the application assigned in this class. And, i am hoping to have different languages support to the app as well)

  • 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-06-15T07:33:35+00:00Added an answer on June 15, 2026 at 7:33 am

    Have a look at Resource bundle

    A copy paste from the documentation:

    When your program needs a locale-specific object, it loads the ResourceBundle class using the getBundle method:

     ResourceBundle myResources =
     ResourceBundle.getBundle("MyResources", currentLocale);
    

    Resource bundles contain key/value pairs. The keys uniquely identify a locale-specific object in the bundle.

    Here’s an example of a ListResourceBundle that contains two key/value pairs:

     public class MyResources extends ListResourceBundle {
         protected Object[][] getContents() {
             return new Object[][] {
                 // LOCALIZE THE SECOND STRING OF EACH ARRAY (e.g., "OK")
                 {"OkKey", "OK"},
                 {"CancelKey", "Cancel"},
                 // END OF MATERIAL TO LOCALIZE
            };
         }
     }
    

    Keys are always Strings. In this example, the keys are “OkKey” and “CancelKey”. In the above example, the values are also Strings–“OK” and “Cancel”–but they don’t have to be. The values can be any type of object.
    You retrieve an object from resource bundle using the appropriate getter method. Because “OkKey” and “CancelKey” are both strings, you would use getString to retrieve them:

    button1 = new Button(myResources.getString("OkKey"));
    button2 = new Button(myResources.getString("CancelKey"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a class with a static public property called Info. via reflection i
I have a class called: ComplexNumber and I have a string that I need
I have a class called Account public class Account { public double balance =
I have a class called Movie with the following private data members: private: string
I have an abstract class called Grouping. I have a subclass called GroupingNNA. public
I have a class called options written in c++, here is the header info:
I have a class called Partner, that I need to Submit all the info
I have 4 classes Comment Class: public class comment { public string Username {
I have a class called Trial which has_many results. Now What I want to
I have a class called Metadata, which is declared within the namespace A::B::C ,

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.