FileDocCategorySizeDatePackage
NumFormatParse.javaAPI DocExample595Sat Nov 25 12:56:04 GMT 2000None

NumFormatParse

public class NumFormatParse extends Object

Fields Summary
public static final String
input
A number to parse
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] av)
The main (and only) method in this class.

	//-

	         
	      

		//+
		NumberFormat defForm = NumberFormat.getInstance();

		try {
			Number d = defForm.parse(input);
			System.out.println(input + 
				" parses as " + d +
				" and formats as " + defForm.format(d));
		} catch (ParseException pe) {
			System.err.println(input + "not parseable!");
		}
		//-