Code example for ChoiceFormat

0
    { 
      throw new NullPointerException();
    } 
    this.pattern = pattern;
    this.locale = locale;
    this.choiceFormat = new ChoiceFormat(pattern);
  } 
 
  /** 
   * Returns the current locale of the formatter. 
   * 
   * @return the current locale, never null. 
   */ 
  public Locale getLocale()
  { 
    return locale;
  } 
 
  /** 
   * Returns the currently active pattern. 
   *