| Return | Method | Summary |
|---|---|---|
| String | toEngineeringString() | Using engineering notation if an exponent is needed. |
| String | toPlainString() | Without an exponent field. |
| String | toString() | Using scientific notation if an exponent is needed. |
import java.math.BigDecimal;
public class Main {
public static void main(String[] args) {
BigDecimal first = new BigDecimal(100000f);
System.out.println(first.toEngineeringString());
System.out.println(first.toPlainString());
System.out.println(first.toString());
}
}
The output:
100000
100000
100000java2s.com | | Contact Us | Privacy Policy |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |