title: Inserting BigDecimal numbers into ArrayList in java
body: <p>How can I insert <code>BigDecimal</code> values into an <code>ArrayList</code> using java?
  First i declare a bigdecimal number(here it is 0) as shown below.
  and after that I need to insert this bigdecimal value 'unit' into an arraylist.My code snippet is shown below.</p>
  
  <pre><code>BigDecimal unit = new BigDecimal(0);
  int x=0;
  int y=10;
  
  while(x&lt;10){
  
      // Here i need to insert the `BigDecimal` value "unit" into an `ArrayList` for each iteration of this loop
  
      x++;
  }
  </code></pre>