Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Advanced-java] Default number formating


  • From: nb_news@xxxxxxxxxxx (Nuri Besen)
  • Subject: [Advanced-java] Default number formating
  • Date: Thu, 31 Jan 2002 10:41:25 -0500

Hello,

I am trying to output a flat text file with some number data in it.
I have a PrintWriter and do a println to output the data.  One piece of data 
is a double (not a Double object) and the output is correct except the 
decimal separator.  I thought the VM used the local decimal separator of the 
platform but it does not.

double db = 5.03;
pw.println("db="+db);

the output is: 5.03
expected is: 5,03 (on my NT platform with JVM 1.3)

Do I have to run it thru the NumberFormat class instance?

Thanks,
Nuri

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com