title: Are code statements that are outside the synchronized statement thread-safe?
body: <pre><code>public void addName(String name) {
      synchronized(this) {
          lastName = name;
          nameCount++;
      }
      nameList.add(name);
      doA();
      doB();
  }
  </code></pre>
  
  <p>Following the java document's example above, the "nameList.add(name);doA();doB();" are thread-safe ?</p>