Am using Selenium RC with Junit+Eclipse Framework. One of my script
working on calculations, which should return the 2 digit decimal
number after rounding. But its not considering the 3rd digit to round
the number. I am a tester with basic java skills. Any help is
appreciated.
vat=roundTwoDecimals(sub_cost*17.50/100.00);
public double roundTwoDecimals(double d)
{
DecimalFormat twoDForm = new DecimalFormat("#.##");
return Double.valueOf(twoDForm.format(d));
}
Thanks
Rama
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
But its not rounding the number based on 3rd digit, simply returning
12.23 / 12.29. Is there any workaround to return the numbers as you
mentioned?
Thanks
Rama
> > selenium-user...@googlegroups.com<selenium-users%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/selenium-users?hl=en.
>
> --
> Ritesh Mahajan- Hide quoted text -
>
> - Show quoted text -
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.