title: Volatile needed if method is synchronized?
body: <p>I have multiple threads accessing <code>class Aufzahlen</code> and incrementing the cc variable. I wonder if i don't put cc on volatile but my method on synchronized is there any room for error here? Since the cc variable will only be accessed once at a time. </p>
  
  <p>Is it still possible for threads to have the cc variable in there own cache and therefor mess with it? I had been running this code example for a while now and didn't find any errors so far.</p>
  
  <pre><code>public class Aufzahlen {
  private int cc=1;
  
    public synchronized void aufzahlen() throws InterruptedException {
      cc = cc +1;
    }
  
  
    public synchronized void printa() {
      // TODO Auto-generated method stub
      System.out.println("Thread: " + Thread.currentThread() + "Zahl: " + cc);
    }
  
  {
  </code></pre>