title: synchronized method does not take int as its valid argument?
body: <pre><code>public void run(){
          if(Singleton.getBuffer()&lt;Singleton.getLimit()){
              synchronized(Singleton.getBuffer()){
                      Singleton.setBuffer(Singleton.getBuffer()+1);
                      notify();
              }
          }
  </code></pre>
  
  <blockquote>
    <p>In this code i am having trouble getting the lock on statc volatile int buffer..
    it says int is not a valid type's statement for a sychronized method</p>
  </blockquote>