A Double is just a number, if you want it formatted then you need to return
a String.
See http://java.sun.com/j2se/1.5.0/docs/api/java/text/NumberFormat.html and
if you want this formatted as currency look at the getCurrencyInstance()
method.
*
*
On Fri, Jun 5, 2009 at 5:28 AM, Stefano wrote:
On Thu, Jun 4, 2009 at 21:30, Greg Lindholm wrote:
> You need to format the number how you would like it.
> If you have a fixed format and don't have to worry about
> internationalization then you could just add another method to your class
> that returns it formatted the way you like i.e. getCur
You need to format the number how you would like it.
If you have a fixed format and don't have to worry about
internationalization then you could just add another method to your class
that returns it formatted the way you like i.e. getCurrentMoneyFormatted().
However if you need to internationaliz
Hi all.
i've a little problem.
I've a EJB inside my session, i take it from a jsp and print out some
values:
now, this value is a double. and struts print 2.0E09
how can i print 2.0. so the entire number without exponent?
thanks
--
Stefano
Hi all.
i've a little problem.
I've a EJB inside my session, i take it from a jsp and print out some
values:
now, this value is a double. and struts print 2.0E09
how can i print 2.0. so the entire number without exponent?
thanks
--
Stefano
5 matches
Mail list logo