title: Use getter/setter methods in interface
body: <p>My question is how can I write setter/getter methods and static fields in an interface and implement it in another class.</p>
  <p>An example:</p>
  <pre><code>public interface MyInterface {
  int number = 0;
  
  public int setNumber(int num);{
  
   }
  }
  
  // Use it
  
  public MyClass implements MyInterface{
  
   ...
  
  public int setNumber(int num) {
     number = num;   // Error, Why?
   }
  }
  </code></pre>
  <p>I get error on <code>number = num</code> but it get no error in the <code>setName(...)</code> method!</p>