Linux 환경에서 10 진수를 파싱하는 데 문제가 있습니다. Windows에서 구문 분석 할 때 모든 것이 괜찮습니다. 다음은Java DecimalFormat - Linux에서 숫자 형식이 잘못되었습니다.
, 코드
String price; DecimalFormat FORMATTER = (DecimalFormat)DecimalFormat.getInstance(); double customPrice = FORMATTER.parse(price).doubleValue();
결과
가격 =의 '9'다음 customPrice는 = '9.0'때 - 그것은 괜찮
때 가격 = '1,00 '그러면 customPrice ='100.0 '- 잘못되었습니다
price = '25, 00'then customPrice = '2500.0'- 잘못되었습니다
문제가 무엇인지 말해 줄 수 있습니까? 감사합니다
이 솔루션은 내 문제를 해결, 감사합니다! – damians