I가 다음 코드 다음 출력 생성대문자와 소문자 E를 모두 지수 분리 자로 지원하는 Java에서 NumberFormat을 만드는 방법은 무엇입니까?
NumberFormat numberInstance = NumberFormat.getNumberInstance();
System.out.println(numberInstance.parse("6.543E-4"));
System.out.println(numberInstance.parse("6.543e-4"));
:
6.543E-4
6.543
를 지수로서 대소 E를 모두 인식하는 NumberFormat를 조정할 수있는 방법이 있는가 분리 기호? 최선의 해결 방법이 있습니까? 먼저 입력에서 toUpper()를 실행하는 것보다 나은 점이 있습니까?
동의어, 구현 당 자본 E입니다. http://docs.oracle.com/javase/1.4.2/docs/api/java/text/DecimalFormat.html –
'str.replace ('e ','E ')' –