VOOZH about

URL: https://www.geeksforgeeks.org/java/bigdecimal-unscaledvalue-in-java/

⇱ BigDecimal unscaledValue() in Java - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

BigDecimal unscaledValue() in Java

Last Updated : 4 Dec, 2018
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()). Syntax:
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: Program 1:
Output:
The Unscaled Value of 175.856 is 175856
The Unscaled Value of -275.73 is -27573
Program 2:
Output:
The Unscaled Value of 5.5 is 55
The Unscaled Value of -2.73 is -273
Reference: https://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html#unscaledValue()
Comment