Re: DecimalFormat ignoring exponent? -
03-01-2006
, 01:46 PM
Here is the sample program:
==========Foo.java===============
import java.text.*;
/**
*/
public class Foo
{
/** @attribute System.STAThread() */
public static void main(String[] args) throws Exception
{
NumberFormat format = NumberFormat.getNumberInstance();
System.out.println(format.parse("9E3"));
System.out.println(format.parse("9.1E3"));
}
}
=================================
The output in J# is 9 and 9.1. In Java, it's 9000 and 9100.
Xiao |