title: Why can't Scala have declared but undefined variables while Java can?
body: <p>This compiles:</p>
  
  <pre><code>public class SandboxJava { //Java
    public Integer cards;
  }
  </code></pre>
  
  <p>But this does not:</p>
  
  <pre><code>class SandboxScala{
    var cards:Int //Throws saying the class must be abstract to have undefined variables
  }
  </code></pre>
  
  <p>Now I know the fact that <code>var</code>s must be initialized but why does not Scala have this functionality of having undefined variables in the first place?</p>