title: scala class constructor parameters
body: <p>What's the difference between:</p>
  
  <pre><code>class Person(name: String, age: Int) {
    def say = "My name is " + name + ", age " + age
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>class Person(val name: String, val age: Int) { 
    def say = "My name is " + name + ", age " + age
  }
  </code></pre>
  
  <p>Can I declare parameters as <code>var</code>s, and change their values later? For instance,</p>
  
  <pre><code>class Person(var name: String, var age: Int) {
  
    age = happyBirthday(5)
  
    def happyBirthday(n: Int) {
      println("happy " + n + " birthday")
      n
    }
  }
  </code></pre>