In this example, bigdecimal class precision method working is demonstrated. Method return type is int. Method returns the number of digits of an unscaled object value.
Method throws NumberFormatException if it finds value other than integer and double.
Syntax for using the method : public int precision()
BigDecimal objects with names x;
int i = x.precision();
Note: Method generates value 1 for this.object value zero.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.