Java BigDecimal hashCode() methodThe hashCode() method of java BigDecimal class is used to obtain the hash code of a BigDecimal Value. Note: Two BigDecimal objects that are numerically equal but differ in scale (like 2.0 and 2.00) will generally not have the same hash code.Syntax:Parameter:No Exception:No Returns:It returns hash Code of BigDecimal. Example 1Test it NowOutput: Returned hash code value is = 3565 Example 2Test it NowOutput: Returned hash code value is = -3565 Example 3Test it NowOutput: Returned hash code value is = 511501 Example 4Test it NowOutput: Returned hash code value is = 5115002 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