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 <elste...@gmail.com> wrote:

> On Thu, Jun 4, 2009 at 21:30, Greg Lindholm <greg.lindh...@gmail.com>
> 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.
> getCurrentMoneyFormatted().
> >
>
>
> I don't think about  internationalization, is a simply project done for the
> university, the i18n is too much :D.
> so, the method getCurrentMoneyFormatted() can return a double formatted or
> only a string? and how can i format the double in order to have 2 decimal
> and the number without the exponential?
>
>
>
>
>
> --
> Stefano
>

Reply via email to