title: Can a variable be abstract in an abstract Java class?
body: <p>Can you declare an abstract variable type in an abstract class? I am receiving an error when I put this line of code in. I can declare a variable that is final and not final but I am not sure if I should be able to declare a variable that is abstract. What would be the real advantage between an interface and an abstract class? </p>
  
  <pre><code>  Error Code:
  
         abstract int myScore = 100; &lt;-- Causes an error
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>public abstract class GraphicObject {
         int home = 100;
         String myString = "";
         final int score = 0;
  
         abstract void draw();
         abstract void meMethod1();
         abstract void meMethod2();
  
         int meMethod3() {
             return 0;
         }
      }
  </code></pre>