title: Attributes / member variables in interfaces?
body: <p>I wish to know is there any way in which I can make it compulsory for the implementer class to declare the objects handles/primitives as they do with methods.
  for e.g.:</p>
  
  <pre><code>public interface Rectangle {    
      int height = 0;
      int width = 0;
  
      public int getHeight();
      public int getWidth();
      public void setHeight(int height);
      public void setWidth(int width);                
  }
  
  
  public class Tile implements Rectangle{
      @Override
      public int getHeight() {
          return 0;
      }
  
      @Override
      public int getWidth() {
          return 0;
      }
  
      @Override
      public void setHeight(int height) {
      }
  
      @Override
      public void setWidth(int width) {   
      }
  
  }
  </code></pre>
  
  <p>In the above method how can we compel Tile class to declare height and width attributes using the interface? For some reason I wish to do it with interface only!</p>
  
  <p>I initially thought of using it with inheritance.
  But thing is I have to deal with 3 classes.!</p>
  
  <ol>
  <li>Rectangle</li>
  <li>Tile</li>
  <li>JLabel.!</li>
  </ol>
  
  <p>&nbsp;</p>
  
  <pre><code> class Tile extends JLabel implements Rectangle {}
  </code></pre>
  
  <p>would work.!</p>
  
  <p>but</p>
  
  <pre><code>class Tile extends JLabel extends Rectangle {}
  </code></pre>
  
  <p>woud not.!</p>