title: How to make java class thread safe?
body: <p>I have a java class as below</p>
  
  <pre><code> class User {
  
      String name;
      String phone;
  
      public String getName() {
          return name;
      }
  
      public String getPhone() {
          return phone;
      }
  
  }
  </code></pre>
  
  <p>The way this class is used is, for every thread 1 object of this User class is created. Now since there is one copy of object for every thread, can i call this class as thread safe?</p>
  
  <p>Do I need to synchronize these methods?</p>