title: multi-threading, performance and precision consideration
body: <p>consider the following class:</p>
  
  <pre><code>public class Money {
      private double amount;
  
      public Money(double amount) {
          super();
          this.amount = amount;
      }
  
      public double getAmount() {
          return amount;
      }
  
      public void setAmount(double amount) {
          this.amount = amount;
      }
  
      public Money multiplyBy( int factor) {
          this.amount *= factor;
          return this;
      }
  }
  </code></pre>
  
  <p>what are the precautions that i can take to make sure that this class doesn't have any problem with multi-threading. have a good performance. while making sure that the money precision is not going to be problem</p>