The java.math.BigDecimal.unscaledValue() is an inbuilt method in java that returns a BigInteger whose value is the unscaled value of a BigDecimal value. The value computes (this * 10this.scale()).
public BigInteger unscaledValue()
Parameters: The method does not accepts any parameter.
Return value: This method returns a BigInteger whose value is the unscaled value of this BigDecimal value.
Below program illustrates the BigDecimal.unscaledValue() method:
The Unscaled Value of 175.856 is 175856 The Unscaled Value of -275.73 is -27573
The Unscaled Value of 5.5 is 55 The Unscaled Value of -2.73 is -273
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.