Java BigDecimal floatValue() methodThe floatValue() method of java BigDecimal class is used to Convert this BigDecimal to a float value. when the return value is finite, this conversion can lose information about the precision of the BigDecimal value. Syntax:Parameter:No Exception:No Returns:It returns float value after conversion from BigDecimal. Example 1Test it NowOutput: Returned float value is : 1532.1276 Example 2Test it NowOutput: Returned float value is : 16322.128 Example 3Test it NowOutput: Returned float value is : 1632662.1 Example 4Test it NowOutput: Returned float value is : -165662.12 Next TopicJava BigDecimal |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India