This post originated from an RSS feed registered with Java Buzz
by Arpit Mandliya.
Original Post: Java BigDecimal
Feed Title: Java tutorial for beginners
Feed URL: http://feeds.feedburner.com/arpitmandliyasblog
Feed Description: A blog about java programming language and its frameworks
In this post, we will see about Java BigDecimal class. BigDecimal class contains Arithmetic operations, rounding, comparison, scaling. It provides high precision arithmetic operations, so generally used to handle numbers in banking and financial domain. Java BigDecimal provides a lot of options to control rounding. You can choose various rounding modes such as round half up or round up down to do the rounding. Here is simple way to create a BigDecimal.We will use String based constructor for creating BigDecimal object. An example to set scale upto 2 decimal places for BigDecimal: As BigDecimal is immutable just like