R
Rakesh
For a particular application - I need to format decimals with strictly
6 digits , after the decimal separator (even if they are not
significant ).
More specifically I would like the following test case to succeed.
public void testZeroFormatting() {
DecimalFormat myformat = new DecimalFormat("#############.######");
assertEquals("Zero ", "0.000000", myformat.format(0.0f));
}
For now , the function returns 0, instead of 0.000000 (as I want it
to). Any idea what I am missing here.
6 digits , after the decimal separator (even if they are not
significant ).
More specifically I would like the following test case to succeed.
public void testZeroFormatting() {
DecimalFormat myformat = new DecimalFormat("#############.######");
assertEquals("Zero ", "0.000000", myformat.format(0.0f));
}
For now , the function returns 0, instead of 0.000000 (as I want it
to). Any idea what I am missing here.