code: public String sprintf(double x)
        throws IllegalArgumentException {
      Enumeration e = vFmt.elements();
      ConversionSpecification cs = null;
      char c = 0;
      StringBuffer sb=new StringBuffer();
      while (e.hasMoreElements()) {
        cs = (ConversionSpecification)
          e.nextElement();
        c = cs.getConversionCharacter();
        if (c=='\0') sb.append(cs.getLiteral());
        else if (c=='%') sb.append("%");
        else sb.append(cs.internalsprintf(x));
      }
      return sb.toString();
    }
docs: Format a double.
  @param x The double to format.
  @return  The formatted String.
  @exception IllegalArgumentException if the
  conversion character is c, C, s, S,
  d, d, x, X, or o.