Re: [java ee programming] ParseDouble problem

2011-07-17 Thread wescley costa
hello, If you used jdk 1.5+, you will can try the String method replace (link below), this way, all comma separator in the number will be change in dot separators. Take care with numbers that contains dot separtor as decimal before execute this one.

Re: [java ee programming] ParseDouble problem

2011-07-17 Thread wescley costa
Rafael, The John's solution it´s better than mine. regards Wescley 2011/7/16 Rafał Laczek rafal_lac...@wp.pl Hi, Thanks for advice. Finally I sued double val = Double.parseDouble(strValue.replace(oldChar, newChar)); In my case it was: *double* resultDoub =

[java ee programming] ParseDouble problem

2011-07-16 Thread Rafał Laczek
Hi Colleagues, In my application I have input string field. String resultStr is parsed into double. The problem is when resultStr is with comma eg. 2,3 instead of 2.3 (with dot). Can I solve it in any way? Bellow is my current code. double resultDoub =Double.parseDouble(resultStr); Thanks in

Re: [java ee programming] ParseDouble problem

2011-07-16 Thread John Masseria
Take a look at NumberFormat: http://download.oracle.com/javase/1,5.0/docs/api/java/text/NumberFormat.html public abstract class *NumberFormat*extends Format http://download.oracle.com/javase/1,5.0/docs/api/java/text/Format.html NumberFormat is the abstract base class for all number formats.

Re: [java ee programming] ParseDouble problem

2011-07-16 Thread Rafał Laczek
Hi, Thanks for advice. Finally I sued doubleval = Double.parseDouble(strValue.replace(oldChar, newChar)); In my case it was: double resultDoub = Double.parseDouble(resultStr.replace(",", "." )); Regards, Rafal Dnia 16-07-2011 o godz. 18:09 John Masseria napisał(a): Take a look at