Description Of BigDecimal: toPlainString()
The java.math.BigDecimal.toPlainString() returns a string representation of this BigDecimal without an exponent field. For values with a positive scale, the number of digits to the right of the decimal point is used to indicate scale. For values with a zero or negative scale, the resulting string is generated as if the value were converted to a numerically equal value with zero scale and as if all the trailing zeros of the zero scale value were present in the result.BigDecimal.toPlainString() method returns a string representation of this BigDecimal without an exponent field.
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("toPlainString string value of " + bg + " is " + bg.toPlainString()); } }
ไม่มีความคิดเห็น :
แสดงความคิดเห็น