Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ListResourceBundle;
- import java.util.Locale;
- import java.util.ResourceBundle;
- public class LResBundle_en_US extends ListResourceBundle{
- private Object[][] contents ={{"WELCOME","Welcome, you."},{"LOCATION","Murica"}};
- public LResBundle_en_US (){
- }
- @Override
- protected Object[][] getContents() {
- return contents;
- }
- public static void main(String[] args)
- {
- ResourceBundle myBundle=ResourceBundle.getBundle("LResBundle_en_US",new Locale("en", "US"));
- String usWelcome = myBundle.getString("WELCOME");
- String usLocation=myBundle.getString("LOCATION");
- System.out.println(usWelcome+","+usLocation);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement