FileDocCategorySizeDatePackage
ListDemo.javaAPI DocExample1787Tue Dec 12 18:57:34 GMT 2000None

ListDemo

public class ListDemo extends Object

Fields Summary
Constructors Summary
Methods Summary
static voiddisplayValues(java.util.Locale currentLocale)


      ResourceBundle stats = 
         ResourceBundle.getBundle("StatsBundle",currentLocale);

      Integer gdp = (Integer)stats.getObject("GDP");
      System.out.println("GDP = " + gdp.toString());
      Integer pop = (Integer)stats.getObject("Population");
      System.out.println("Population = " + pop.toString());
      Double lit = (Double)stats.getObject("Literacy");
      System.out.println("Literacy = " + lit.toString());
      
   
public static voidmain(java.lang.String[] args)


      Locale[] supportedLocales = {
         new Locale("en","CA"),
         new Locale("ja","JP"),
         new Locale("fr","FR")
      };

      for (int i = 0; i < supportedLocales.length; i ++) {
         System.out.println("Locale = " + supportedLocales[i]);
         displayValues(supportedLocales[i]);
         System.out.println();
      }