Description Of BigDecimal: toEngineeringString()
The java.math.BigDecimal.toEngineeringString() returns a string representation of this BigDecimal , using engineering notation if an exponent is needed.BigDecimal.toEngineeringString() method returns string representation of this BigDecimal , using engineering notation if an exponent is needed.
Code Example Java BigDecimal
import java.math.BigDecimal;
public class BigDecimalExam {
public static void main(String[] args) {
BigDecimal bg = new BigDecimal("1E+5");
System.out.println("Engineering string value of " + bg + " is "
+ bg.toEngineeringString());
}
}
ไม่มีความคิดเห็น :
แสดงความคิดเห็น